Skip to content

feat: Allow configuring of min/max in histograms#8095

Open
MikeGoldsmith wants to merge 4 commits intoopen-telemetry:mainfrom
honeycombio:mike/disable-histogram-minmax
Open

feat: Allow configuring of min/max in histograms#8095
MikeGoldsmith wants to merge 4 commits intoopen-telemetry:mainfrom
honeycombio:mike/disable-histogram-minmax

Conversation

@MikeGoldsmith
Copy link
Member

@MikeGoldsmith MikeGoldsmith commented Feb 16, 2026

Summary

Adds recordMinMax parameter 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

  • Added recordMinMax parameter to Aggregation.explicitBucketHistogram() and Aggregation.base2ExponentialBucketHistogram()
  • Updated aggregator implementations to conditionally record min/max based on parameter
  • Integrated with declarative config - passes record_min_max from YAML to SDK
  • Backward compatible - existing methods default to recordMinMax=true
  • AggregationFactory extracts record_min_max from model and passes to SDK (defaults to true when null)
  • Updated public API diff doc with new methods

Testing

  • Added DoubleExplicitBucketHistogramAggregatorTest.testRecordMinMaxDisabled - verifies min/max not tracked when disabled for explicit histograms
  • Added DoubleBase2ExponentialHistogramAggregatorTest.testRecordMinMaxDisabled - verifies min/max not tracked when disabled for exponential histograms
  • Updated existing tests to use new constructor signatures

@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner February 16, 2026 14:55
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 16, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

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.
@MikeGoldsmith MikeGoldsmith changed the title feat: Add recordMinMax parameter to histogram aggregations feat: Allow configuring of min/max in histograms Feb 16, 2026
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.20%. Comparing base (8aea961) to head (6e30bcb).

Files with missing lines Patch % Lines
...gator/DoubleExplicitBucketHistogramAggregator.java 81.81% 0 Missing and 2 partials ⚠️
...nal/view/Base2ExponentialHistogramAggregation.java 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8095      +/-   ##
============================================
- Coverage     90.21%   90.20%   -0.02%     
- Complexity     7606     7612       +6     
============================================
  Files           841      841              
  Lines         22923    22949      +26     
  Branches       2291     2304      +13     
============================================
+ Hits          20680    20700      +20     
- Misses         1526     1527       +1     
- Partials        717      722       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support RecordMinMax for histogram and exponential histogram aggregations

1 participant