feat: OTEL_METRICS_EXEMPLAR_FILTER env - #4328
Open
proost wants to merge 6 commits into
Open
Conversation
…y-cpp into feat-exemplar-filter-config
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4328 +/- ##
==========================================
+ Coverage 80.87% 80.95% +0.09%
==========================================
Files 450 450
Lines 19186 19205 +19
==========================================
+ Hits 15515 15546 +31
+ Misses 3671 3659 -12
🚀 New features to boost your workflow:
|
lalitb
reviewed
Aug 2, 2026
| .Build()) | ||
| #ifdef ENABLE_METRICS_EXEMPLAR_PREVIEW | ||
| , | ||
| ExemplarFilterType exemplar_filter_type = ExemplarFilterType::kTraceBased |
Member
There was a problem hiding this comment.
Should this read OTEL_METRICS_EXEMPLAR_FILTER too? Right now, apps that create MeterContext or MeterProvider directly always get trace_based. The env setting only works through MeterContextFactory.
Contributor
Author
There was a problem hiding this comment.
OK, then how about calling as default argument? 7907e73
Member
|
Please remove "Fixes #4178" from PR desc, as closing this Pr won't make the Exemplar to be declared stable. |
lalitb
approved these changes
Aug 2, 2026
lalitb
left a comment
Member
There was a problem hiding this comment.
LGTM. Couple of comments, nothing blocking.
…y-cpp into feat-exemplar-filter-config
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.
prev PR: #4267
Changes
Introduce "OTEL_METRICS_EXEMPLAR_FILTER". env is missing, so i add it.
I changed to use ctor instead of setter, Because i referred SpanLimit and breaking change is acceptable(due to preview).
According to spec, default is trace_based. But if performance downgrade worry, change to off is reasonable to me.
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes