-
Notifications
You must be signed in to change notification settings - Fork 65
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
Counter HELP
and TYPE
lack _total
suffix
#194
Comments
This is inline with the OpenMetrics specification: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#counter-1 When exporting, are you setting the correct content type? Lines 69 to 70 in b462e61
|
I don't feel strongly about following the specification. That said, I want to be either (a) consistent with the specification or (b) consistent with the other client implementations and ideally (a) and (b). |
I set content type here: Go library seems to include OpenMetrics is indeed different from Prometheus documentation and what Go library does :/ I found that incompatibilities are documented here: So currently Rust client library follows OpenMetrics specification and this is different from what Prometheus expects. |
OpenMetrics support is also on roadmap: https://prometheus.io/docs/introduction/roadmap/#adopt-openmetrics I will try updating Prometheus to the latest version and file a Prometheus bug then. |
I have filed Prometheus bug: prometheus/prometheus#13944 |
When encoding counters,
prometheus-client
adds_total
suffix to sample name:client_rust/src/encoding/text.rs
Line 187 in b462e61
This suffix is however not added in
HELP
andTYPE
lines. This is visible in tests, for example:client_rust/src/encoding/text.rs
Lines 20 to 23 in b462e61
HELP
andTYPE
lines should have the same suffix, it is shown in example at https://prometheus.io/docs/instrumenting/exposition_formats/#text-format-example:Because of this bug Grafana does not display help for counters. At the same time for gauge type metrics help is displayed.
The text was updated successfully, but these errors were encountered: