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

[prometheus components] For histograms without sums, leave the sum unset #9120

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Apr 8, 2022

Description:

Prometheus histograms don't have a sum if the histogram includes negative observations. Now that the protocol supports a notion of "unset" sums, use this in prometheus components to correctly handle setting the sum.

I tried to do this for the prometheus exporter as well, but NewConstHistogram requires a sum (i.e. doesn't support an unset sum). https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusexporter/collector.go#L200

Link to tracking Issue:

Part of #7546

Testing:

Added unit tests.

@dashpole dashpole force-pushed the histogram_without_sum branch 5 times, most recently from d89f35f to f9ed2cf Compare April 19, 2022 17:28
@dashpole dashpole added the comp:prometheus Prometheus related issues label Apr 25, 2022
@dashpole dashpole force-pushed the histogram_without_sum branch from f9ed2cf to a3412c8 Compare April 25, 2022 12:49
@dashpole
Copy link
Contributor Author

cc @open-telemetry/wg-prometheus

@dashpole dashpole force-pushed the histogram_without_sum branch from a3412c8 to 1ccf7cd Compare April 28, 2022 14:21
@dashpole dashpole force-pushed the histogram_without_sum branch from 1ccf7cd to cccfb37 Compare May 6, 2022 17:18
@dashpole dashpole force-pushed the histogram_without_sum branch from cccfb37 to 95f1023 Compare May 20, 2022 18:50
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jun 13, 2022
@dashpole dashpole force-pushed the histogram_without_sum branch from b87e925 to a002e3f Compare June 14, 2022 13:40
@dashpole dashpole removed the Stale label Jun 14, 2022
@dashpole dashpole force-pushed the histogram_without_sum branch 2 times, most recently from 80dd729 to 7a50abd Compare June 21, 2022 20:36
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2022

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jul 6, 2022
@dashpole dashpole force-pushed the histogram_without_sum branch from 7a50abd to 8b58c4e Compare August 4, 2022 21:17
@dashpole dashpole removed the Stale label Aug 5, 2022
@dashpole dashpole force-pushed the histogram_without_sum branch from 6d4618f to b47f248 Compare August 5, 2022 15:02
@dashpole dashpole force-pushed the histogram_without_sum branch from b47f248 to 40950ed Compare August 19, 2022 16:43
@dashpole dashpole added the ready to merge Code review completed; ready to merge by maintainers label Aug 25, 2022
@dashpole dashpole force-pushed the histogram_without_sum branch 2 times, most recently from ca3b768 to 5ce3746 Compare September 1, 2022 12:26
@bogdandrutu
Copy link
Member

@dashpole needs a rebase, sorry for the issue.

@dashpole dashpole force-pushed the histogram_without_sum branch from 5ce3746 to d9663d7 Compare September 7, 2022 15:35
@bogdandrutu bogdandrutu merged commit 213d9c6 into open-telemetry:main Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:prometheus Prometheus related issues exporter/prometheusremotewrite ready to merge Code review completed; ready to merge by maintainers receiver/prometheus Prometheus receiver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants