-
Notifications
You must be signed in to change notification settings - Fork 64
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
Metric names are incorrectly generated #51
Comments
It is somewhat surprising that the metric name provided to counter constructors will have |
Not according to the OpenMetrics specification: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#counter-1
Good idea. For the former, would you mind extending the documentation @08d2? For the latter, let's move the discussion to #52. |
I don't know anything about OpenMetrics, really, and I don't consider it any kind of authority. I can observe that the "_created" thing described in your link is not valid for Prometheus, though. edit: Ah, reading more carefully....
AFAIK, this is not compatible with the Prometheus exposition format. For Prometheus, the identifier after e.g.
|
Note that you need to set the right content type in order for Prometheus parse the output of a scrape in the Open Metrics format. Line 37 in 69e6674
|
We have ~100 unsuffixed metrics at work and we are trying to move away from |
That sounds reasonable. I would suggest we add the above type under a feature flag (e.g. Note that I would see this as a small helper to enable folks to migrate to the OpenMetrics format eventually. I don't see this as a long term solution for downstream users. Do you agree with that mind set @nox? //CC @RichiH in case you have opinions. |
I can understand the resistance to changing names, but also note that following best current practices earlier rather than later is usually Least Bad, long term. The proposed seems like a partial undoing of one specific thing, not a full Prometheus exposition format 0.0.4; that's arguably the worst of both worlds globally, even though it may appear to make sense locally. All that being said, no strong opinions on if this is implemented or not. |
OpenMetrics remains an experiment, not a standard. Prometheus client libraries should default to the core exposition formats, and leave OpenMetrics as an opt-in alternative. |
The problem is demonstrated by the following comment —
The
HELP
andTYPE
lines should usemy_counter_total
, notmy_counter
.The text was updated successfully, but these errors were encountered: