-
Notifications
You must be signed in to change notification settings - Fork 911
Prevent duplicate Prometheus description comments #2890
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
Conversation
cc @jack-berg @reyang @open-telemetry/wg-prometheus |
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 although I'm a bit on the fence https://github.com/open-telemetry/opentelemetry-specification/pull/2890/files#r998590686.
@dashpole would you update the changelog? |
Done |
Fixes #2869
Follow-up to #2703. That PR prevents collisions between data points, but not collisions between the descriptions of the metrics.
OpenMetrics requirements
From https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#metricfamily:
Basically, for a given metric name, we MUST have exactly one HELP, TYPE, and UNIT comment.
Changes
This is a bit light on details, but I can add more if people think that would be helpful.
Basically, this is saying that exporters need to deduplicate Prometheus "descriptions" when sending. For TYPE conflicts, some metric has to be dropped, as the data sent might not be valid (e.g. you can't send counter information with a histogram TYPE). For UNIT and HELP comments, it is up to the exporter how to merge, but the exporter MUST NOT keep both comments.
Example approach