-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: handle zero bucket counts in ExponentialHistogram merge #4459
Merged
Conversation
This file contains 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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4459 +/- ##
==========================================
+ Coverage 92.41% 92.42% +0.01%
==========================================
Files 330 330
Lines 9514 9516 +2
Branches 2028 2029 +1
==========================================
+ Hits 8792 8795 +3
+ Misses 722 721 -1
|
mwear
force-pushed
the
expohisto-bug-fix
branch
from
February 5, 2024 03:44
b6b65c3
to
6a642cf
Compare
pichlermarc
approved these changes
Feb 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, that's a tricky one! Thanks for doing the investigation and coming up with a fix so quickly @mwear 🙂
This was referenced Jun 15, 2024
This was referenced Jun 21, 2024
This was referenced Jun 22, 2024
Zirak
pushed a commit
to Zirak/opentelemetry-js
that referenced
this pull request
Sep 14, 2024
…elemetry#4459) Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
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.
Which problem is this PR solving?
This PR fixes a bug in the exponential histogram merge operation where the source histogram has empty bucket counts. The bucket index was not being set properly in this case, and depending on the histogram being merged, it can lead to corrupted counts in the resulting histogram.
Fixes #4450
Short description of the changes
Added special case handling for the zero-length bucket counts case in the
_incrementIndexBy
method.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Added a unit test that replicates a real world failure that exhibits this issue. If you comment out the changes added to
_incrementIndexBy
you will see the newly added test fail.Checklist: