-
Notifications
You must be signed in to change notification settings - Fork 302
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
[Exporter.Geneva] Fix overflow bucket value serialization for Histogram #805
[Exporter.Geneva] Fix overflow bucket value serialization for Histogram #805
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #805 +/- ##
=======================================
Coverage 77.97% 77.97%
=======================================
Files 176 176
Lines 5313 5313
=======================================
Hits 4143 4143
Misses 1170 1170
|
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.
LGTM
@@ -780,6 +779,8 @@ private void CheckSerializationForSingleMetricPoint(Metric metric, GenevaMetricE | |||
listIterator++; | |||
bucketsWithPositiveCount++; | |||
} | |||
|
|||
lastExplicitBound = bucket.ExplicitBound; |
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.
Something about this test design seems off. I was expecting to see a test case being added in the spirit of: "Given buckets x, y, & z expect last bucket to be z + 1." Maybe it is too dynamic for its own good? 😄
Anyway doesn't need to be fixed as part of this, just musing.
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.
Haha you're right! It was too dynamic to even catch that issue in the first place 😀
I'll work on fixing this later.
The values for overflow buckets should be serialized as the value-count pair: LastBucketValue + 1,count
For eg. for a Histogram with the boundaries: [25,50,100], if the value recorded is 150, it should be serialized as the following value-count pair: (101, 1)
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes