You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.118.0 caps the number of exponential histogram buckets produced by deltatocumulative to 160 by downscaling if the number of buckets becomes too large (#33277).
However, it calculates the new scale independently for the positive and negative buckets and then uses the greater result (instead of the lesser), resulting in only one of them being capped and the other still exceeding the limit.
Steps to Reproduce
Send two positive exponential histogram data points with the same scale but offsets more than 160 apart. Do not include any negative data points.
…histograms (open-telemetry#37432)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
While addressing comments a bug was added to the logic of calculating of
the desired scale and it slipped through tests.
Fix the bug (use `min` instead of `max`) and update tests to avoid
regressions in the future.
<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixesopen-telemetry#37416
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Update tests to separately cover positive and negative buckets.
<!--Describe the documentation added.-->
#### Documentation
n/a
<!--Please delete paragraphs that you did not use before submitting.-->
Component(s)
processor/deltatocumulative
What happened?
Description
0.118.0 caps the number of exponential histogram buckets produced by
deltatocumulative
to 160 by downscaling if the number of buckets becomes too large (#33277).However, it calculates the new scale independently for the positive and negative buckets and then uses the greater result (instead of the lesser), resulting in only one of them being capped and the other still exceeding the limit.
Steps to Reproduce
Send two positive exponential histogram data points with the same scale but offsets more than 160 apart. Do not include any negative data points.
For example (some fields omitted for brevity),
Expected Result
The exponential histogram is scaled to 17 to keep the number of positive buckets below 160.
Actual Result
The exponential histogram is not scaled and contains 1001 positive buckets.
Collector version
v0.118.0
Environment information
Environment
OS: macOS Sequoia 15.2
OpenTelemetry Collector configuration
Log output
Additional context
I believe we should be taking the lesser of the limited scales for positive and negative buckets, see here: #36874 (comment)
The text was updated successfully, but these errors were encountered: