Repository navigation
Omit histogram bucket_counts when there are no explicit_bounds - #9095
Open
adityad171 wants to merge 1 commit into
Open
adityad171 wants to merge 1 commit into
adityad171 wants to merge 1 commit into
Conversation
A histogram point with no bucket boundaries, for example from setExplicitBucketBoundariesAdvice(emptyList()) or a Micrometer timer without SLOs, was exported with bucket_counts=[count] and no explicit_bounds. The OTLP proto says a histogram without a distribution must omit both fields. Skip bucket_counts in HistogramDataPointMarshaler and HistogramDataPointStatelessMarshaler when there are no boundaries, and update the two marshaler tests that expected the old output.
Pull request dashboard statusWaiting on the author · refreshed 2026-12-03 17:23 UTC Investigate required status check failures. Status above doesn't look right?
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9095 +/- ##
============================================
- Coverage 90.54% 90.53% -0.01%
- Complexity 11254 11258 +4
============================================
Files 1040 1040
Lines 30703 30708 +5
Branches 4015 4019 +4
============================================
+ Hits 27799 27802 +3
Misses 1928 1928
- Partials 976 978 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Fixes #7238
A histogram point with no bucket boundaries is exported with
bucket_counts=[count]and noexplicit_bounds. The proto says such a point must omit both fields. This affects empty boundary advice, Micrometer timers without SLOs, and the SDK's ownotel.sdk.*duration histograms.Both histogram marshalers now skip
bucket_countswhenexplicit_boundsis empty. Points with boundaries are unchanged.Compatibility
This changes the wire output for these points. These consumers expect today's form:
MetricDataMapper): fails to read back a buffered batch that has such a point.TelemetryConverter): same problem.countersmode: drops the bucket series.Testing
The two updated tests in
MetricsRequestMarshalerTestfail without the fix.:exporters:otlp:common:checkpasses on JDK 25, and the tests also pass on Java 8.Parts of this change were written with an AI coding assistant; I reviewed and tested all of it.