-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Prometheus Histogram Metrics Label “le” are converted from Double to Int #33402
Comments
Pinging code owners for receiver/prometheus: @Aneurysm9 @dashpole. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Interesting. The internal representation of histogram boundaries in the collector is a Float64 Slice. So it can't be converting to an int. This sounds like it might be an issue with the prometheusremotewrite exporter's encoding of the float boundaries. This is what it does today:
The prometheus Go client does this to encode floats in the exposition format: https://github.com/prometheus/common/blob/d726751c69dc327617a6b294f0f1e8d448291d15/expfmt/text_create.go#L480 *bp = strconv.AppendFloat((*bp)[:0], f, 'g', -1, 64) 'g' and 'f' don't seem to make a difference, though: https://go.dev/play/p/KDpgzrHq42O |
Based on the text format example: https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md#text-format-example, the correct encoding of the float |
Pinging code owners for pkg/translator/prometheusremotewrite: @Aneurysm9. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Pinging code owners for exporter/prometheusremotewrite: @Aneurysm9 @rapphil. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Problem:
I recently switched from grafana agent to otel collector to scrape Prometheus metrics.
Inside the Orel collector, I have a Prometheus receiver and a Prometheus remote write exporter.
After this switch, I noticed the values of my Prometheus histogram bucket metric label “le” changed from for example “900.0” to “900”.
My questions:
The text was updated successfully, but these errors were encountered: