feat: Allow configuring of min/max in histograms#8095
Open
MikeGoldsmith wants to merge 8 commits intoopen-telemetry:mainfrom
Open
feat: Allow configuring of min/max in histograms#8095MikeGoldsmith wants to merge 8 commits intoopen-telemetry:mainfrom
MikeGoldsmith wants to merge 8 commits intoopen-telemetry:mainfrom
Conversation
Supports disabling min/max recording to work around GCP min/max handling issues. Backward compatible - defaults to true.
Verifies min/max not tracked when disabled.
9caaa69 to
8f364a5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8095 +/- ##
============================================
- Coverage 90.32% 90.30% -0.02%
- Complexity 7607 7610 +3
============================================
Files 839 839
Lines 22888 22910 +22
Branches 2283 2295 +12
============================================
+ Hits 20673 20690 +17
- Misses 1506 1507 +1
- Partials 709 713 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jack-berg
reviewed
Feb 19, 2026
Member
jack-berg
left a comment
There was a problem hiding this comment.
Couple small comments, but looks good overall. Thanks!
sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/Aggregation.java
Outdated
Show resolved
Hide resolved
...main/java/io/opentelemetry/sdk/metrics/internal/view/ExplicitBucketHistogramAggregation.java
Outdated
Show resolved
Hide resolved
...o/opentelemetry/sdk/metrics/internal/aggregator/DoubleExplicitBucketHistogramAggregator.java
Show resolved
Hide resolved
...o/opentelemetry/sdk/metrics/internal/aggregator/DoubleExplicitBucketHistogramAggregator.java
Outdated
Show resolved
Hide resolved
jack-berg
approved these changes
Feb 19, 2026
…nto mike/disable-histogram-minmax
- Remove @SInCE annotations (added during release flow) - Remove old create() overloads without recordMinMax, update callers - Remove redundant // read-only comment on final primitive field Claude claude-sonnet-4-6 assisted with this change.
a681c40 to
849cc50
Compare
jack-berg
reviewed
Feb 20, 2026
...rc/test/java/io/opentelemetry/sdk/extension/incubator/fileconfig/AggregationFactoryTest.java
Show resolved
Hide resolved
Declarative config tests compare aggregation equality via toString(), so recordMinMax must be included for the comparisons to be valid. Claude claude-sonnet-4-6 assisted with this change.
jack-berg
approved these changes
Feb 20, 2026
Member
jack-berg
left a comment
There was a problem hiding this comment.
Will leave open for a few days to see if any other @open-telemetry/java-approvers have feedback about the new public API surface area
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.
Summary
Adds
recordMinMaxparameter to histogram aggregations per OpenTelemetry spec.Fixes #7859
Motivation
Some users need ability to disable min/max recording in histograms. The OpenTelemetry spec requires this parameter for both explicit and exponential histogram aggregations.
Changes
recordMinMaxparameter toAggregation.explicitBucketHistogram()andAggregation.base2ExponentialBucketHistogram()record_min_maxfrom YAML to SDKrecordMinMax=trueAggregationFactoryextractsrecord_min_maxfrom model and passes to SDK (defaults to true when null)Testing
DoubleExplicitBucketHistogramAggregatorTest.testRecordMinMaxDisabled- verifies min/max not tracked when disabled for explicit histogramsDoubleBase2ExponentialHistogramAggregatorTest.testRecordMinMaxDisabled- verifies min/max not tracked when disabled for exponential histograms