feat(sdk): implement exporter metrics#4976
Open
anuraaga wants to merge 15 commits intoopen-telemetry:mainfrom
Open
feat(sdk): implement exporter metrics#4976anuraaga wants to merge 15 commits intoopen-telemetry:mainfrom
anuraaga wants to merge 15 commits intoopen-telemetry:mainfrom
Conversation
herin049
reviewed
Mar 20, 2026
anuraaga
commented
Mar 27, 2026
19a5d8c to
4f52160
Compare
Contributor
Author
|
Now fails with this which is also somewhat unrelated to this PR. #5030 (review) |
11 tasks
xrmx
reviewed
Apr 3, 2026
…y-python into exporter-metrics
58bebdc to
3c1de6b
Compare
Contributor
Author
|
@xrmx Thanks - think this is finally ready (test failure looks flaky) |
xrmx
approved these changes
Apr 13, 2026
lzchen
approved these changes
Apr 15, 2026
herin049
reviewed
Apr 15, 2026
Comment on lines
+91
to
+92
| count = _component_counter[component_type] | ||
| _component_counter[component_type] = count + 1 |
Contributor
There was a problem hiding this comment.
We might need a lock for this.
Contributor
Author
There was a problem hiding this comment.
Even for the metric exporter which has a setter, I think these are initialization entrypoints and it's mostly inconceivable they'd happen in separate threads. If it really seems worth it, how about a followup to address the other two spots with the same pattern together? With locking involved, probably it reaches the point of needing a helper utility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I am helping to implement SDK internal metrics
https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/
This implements the exporter metrics.
Similar PR in JS: open-telemetry/opentelemetry-js#6480
/cc @xrmx to help with review. As there are many exporters, this is a pretty big one
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist: