Skip to content
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

[prometheusreceiver] should handle histograms without sums #7546

Closed
dashpole opened this issue Feb 3, 2022 · 8 comments
Closed

[prometheusreceiver] should handle histograms without sums #7546

dashpole opened this issue Feb 3, 2022 · 8 comments

Comments

@dashpole
Copy link
Contributor

dashpole commented Feb 3, 2022

According to the OpenMetrics specification for histograms, _sum metrics are not be produced by prometheus clients when there are negative observations. We should handle this case by calculating the sum of all buckets. That isn't possible. We should handle this case by leaving the sum field unset. The current behavior appears to be to produce an OTLP histogram with a sum of 0.

This is blocked on opentelemetry-proto being updated to v0.15.0

cc @Aneurysm9 @MrAlias

@dashpole dashpole added the comp:prometheus Prometheus related issues label Feb 3, 2022
@dashpole dashpole changed the title Prometheus receiver should handle histograms without sums [prometheusreceiver] should handle histograms without sums Mar 9, 2022
@dashpole
Copy link
Contributor Author

While trying to implement this, i've realized that there isn't a way to compute the sum from the buckets. The buckets have the count in each bucket, which is insufficient to produce a sum. I'll need to make an adjustment to the spec.

@dashpole
Copy link
Contributor Author

One other observation is that the current behavior for the prometheus reciever + prometheusremotewrite exporter will add an additional metric for the sum that is always 0, which isn't correct.

@dashpole
Copy link
Contributor Author

Good news. Once we update the opentelemetry-proto to include open-telemetry/opentelemetry-proto#366 (should be in 0.15.0, once it is released), we will be able to leave the field unset, which will fix the extra _sum metric described above.

@dashpole
Copy link
Contributor Author

dashpole commented Apr 8, 2022

I was able to implement the change for the prometheus receiver and prometheus remote write exporter easily. I've opened prometheus/client_golang#1023 to try and make it possible in the prometheus exporter.

@dashpole dashpole self-assigned this Apr 13, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label Nov 8, 2022
@github-actions
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2023
@dashpole dashpole reopened this Jun 23, 2023
@github-actions
Copy link
Contributor

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label Aug 23, 2023
@github-actions
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant