Conversation
Exponential histogram aggregation reused the overflow attribute set for every new measurement after that stream was created, even when the cardinality limit had not been reached. Only route new attribute sets to the overflow stream once the aggregation limit is actually exceeded. Fixes open-telemetry#8776 Signed-off-by: lllakshit <llakshitmathur239@gmail.com>
|
|
|
Confirmed the fix on the expo histogram path — at 85f8ecc, recording One scoping question: Is fixing that in scope here, or better as a follow-up alongside #8077? Either way it'd be worth saying which in the PR description, since #8776 is written generally enough to read as covering all aggregations. Small thing on the test: |
|
@open-telemetry/go-approvers would folks prefer trying to get #8077 in (which fixes the issue as part of the refactor), or do we want to get this PR in to buy more time for review? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8903 +/- ##
=======================================
- Coverage 88.4% 88.4% -0.1%
=======================================
Files 331 331
Lines 21001 21002 +1
=======================================
Hits 18572 18572
- Misses 2429 2430 +1
🚀 New features to boost your workflow:
|
Summary
Fixes #8776
Exponential histogram aggregation treated any existing
otel.metric.overflow=truestream as proof that cardinality overflow had already occurred. After that stream was created, every later unseen attribute set was folded into it, even whenAggregationLimitwas0(unlimited).This change only reuses the overflow stream when the aggregation limit is actually reached. With no limit,
overflowSetremains a normal distinct stream and later attribute sets get their own data points.Test plan
TestExpoHistogramOverflowAttributeBeforeLimitTestExpoHistogramOverflowstill passes (limit enforcement unchanged)go test ./sdk/metric/internal/aggregate -run 'TestExpoHistogramOverflow' -count=1