Repository navigation
Conversation
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
Pull request dashboard statusWaiting on the author · refreshed 2026-10-17 02:49 UTC Move out of draft to request review. Status above doesn't look right?
|
|
still working |
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
Add a test verifying that merging two exponential histograms across cumulative collections produces the same result as aggregating all values in one pass, per issue open-telemetry#3219. This uncovered a bug: when one side (positive or negative) of the histogram has never received a value, its placeholder index_start/index_end (0) was treated as a real boundary during merge, corrupting or crashing the merge instead of being initialized from the first incoming value.
Summary
_ExponentialBucketHistogramAggregation._merge: when one side of the histogram (positive or negative buckets) has never received a value, its placeholderindex_start/index_end(0) was treated as a real boundary during merge, which could corrupt bucket offsets or raise a spuriousIncorrect merge scaleexception. Fixed by initializing the empty side from the first incoming index, mirroring the existing logic inaggregate().Fixes #3219
Test plan
test_merge_into_empty_buckets: minimal deterministic repro of the bug.test_merging_two_histograms_equals_aggregating_independently: randomized property test comparing split-and-merge vs. single-pass aggregation.opentelemetry-sdkmetrics test suite passes (296 tests).