sdk/metric: document unit-sensitivity of DefaultAggregationSelector#8224
Open
alliasgher wants to merge 1 commit intoopen-telemetry:mainfrom
Open
sdk/metric: document unit-sensitivity of DefaultAggregationSelector#8224alliasgher wants to merge 1 commit intoopen-telemetry:mainfrom
alliasgher wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
c3da0c9 to
ac80092
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8224 +/- ##
=======================================
- Coverage 82.5% 82.5% -0.1%
=======================================
Files 310 310
Lines 24555 24555
=======================================
- Hits 20268 20267 -1
+ Misses 3912 3911 -1
- Partials 375 377 +2
🚀 New features to boost your workflow:
|
dmathieu
reviewed
Apr 17, 2026
dashpole
reviewed
Apr 17, 2026
dashpole
reviewed
Apr 17, 2026
The default ExplicitBucketHistogram boundaries returned by
DefaultAggregationSelector are tuned for millisecond-scale measurements
and are not rescaled when an instrument is created with
metric.WithUnit("s") or any other unit. Add a godoc note so users
reading the selector can see this and point them at the knobs for
overriding the boundaries.
Fixes open-telemetry#5891
Signed-off-by: Ali <alliasgher123@gmail.com>
ac80092 to
bf8dcac
Compare
dashpole
approved these changes
Apr 17, 2026
dmathieu
approved these changes
Apr 17, 2026
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
The default `ExplicitBucketHistogram` boundaries returned by `DefaultAggregationSelector` are tuned for millisecond-scale measurements and are not rescaled when an instrument is created with `metric.WithUnit("s")` or any other unit. Add a godoc note so users reading the selector can see this and point them at the knobs for overriding the boundaries.
This is the godoc change agreed to by @dmathieu in #5891 (comment). The actual rescaling behaviour is spec-blocked (the
blocked:specificationlabel on the issue) and is intentionally not touched here.Fixes #5891.
Checklist
#XXXX, will update with real PR number once assigned).