-
Notifications
You must be signed in to change notification settings - Fork 26
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
Histogram buckets are not summed when converted to prometheus v2 #60
Closed
tbolon opened this issue
Mar 29, 2022
· 4 comments
· Fixed by #184 or open-telemetry/opentelemetry-collector-contrib#19454
Closed
Histogram buckets are not summed when converted to prometheus v2 #60
tbolon opened this issue
Mar 29, 2022
· 4 comments
· Fixed by #184 or open-telemetry/opentelemetry-collector-contrib#19454
Comments
Updated link from the proto definition cited above: // bucket_counts is an optional field contains the count values of histogram
// for each bucket.
//
// The sum of the bucket_counts must equal the value in the count field.
//
// The number of elements in bucket_counts array must be by one greater than
// the number of elements in explicit_bounds array.
repeated fixed64 bucket_counts = 6; |
I've confirmed that this is a bug. Not sure how I missed this detail for almost two years! |
jacobmarble
added a commit
that referenced
this issue
Mar 10, 2023
jacobmarble
added a commit
that referenced
this issue
Mar 10, 2023
I'll keep the issue open until the fixed behavior is merged into otel collector contrib |
This was referenced Mar 10, 2023
This fix should land in the next release of OpenTelemetry Collector Contrib, which should happen within two weeks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the otel specification, it is stated that buckets are not cumulative : "The sum of the bucket_counts must equal the value in the count field."
In your example in the collector-contrib repo you seem to expect that the buckets are cumulative (the values are always higher on each successive bucket), on both v1 and v2 example.
The prometheus exporter takes care of summing buckets before sending them to prometheus.
I don't see a cumulative sum in the prometheus_v2 exporter, so I suppose the data will be wrong in influxdb: each bucket will only have its own values, and not include the count from lower buckets.
Please note that I didn't check prometheus_v1, but I suspect the problem to be the same.
The text was updated successfully, but these errors were encountered: