-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Use 1.0.0 in the accept header for application/openmetrics-text #9431
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
Use 1.0.0 in the accept header for application/openmetrics-text #9431
Conversation
dfffbe8
to
998927f
Compare
@roidelapluie Could you please let me know what you think?
|
At first glance we should accept both versions. |
@roidelapluie Does this mean that you want to include every version in the Edit: OpenMetrics specs mandates 1.0.0 for the |
Yes, we would need to accept both 0.0.1 and 1.0.0 for a transition period, during which we update the official instrumentation libraries to 1.0.0. cc @brian-brazil what is your opinion here? Do you agree? |
998927f
to
4f516c1
Compare
Right now only |
It can be straight switched to 1.0.0, and a confirming OM server can always return 1.0.0. This is a holdover from initial development, no need to complicate things. |
4f516c1
to
093c81a
Compare
It means that people who have already switched to openmetrics in client_golang and client_python will see different metric names and buckets? |
No, the negotiation doesn't look at the version as that's not needed yet. |
I think it does... |
Ah, that shouldn't be checking that. Python and Java purposely don't to avoid just this sort of thing delaying the OM rollout. That needs to be fixed in common. |
it seems to me that we would need to accept both or keep the status-quo for the time being. |
What would be the benefit of querying anything other than |
@roidelapluie @brian-brazil What do you think can we move this forward? Right now the version is
I think any of these are better than the current behavior that does not comply with the current OpenMetrics specs. |
related: prometheus/client_java#702 fixes prometheusgh-9430 Signed-off-by: Jonatan Ivanov <jonatan.ivanov@gmail.com>
093c81a
to
65fcab5
Compare
👍🏼 Reasoning is the today if a Client is working today it's because it's processing Accept headers and when it sees Open Metrics (with or without the version) it works. Also today Prometheus successfully processed metrics coming from these Clients. The only caveat to me would be that theres major changes to how OM format is processed/validated before "true 1.0.0" is achieved in which case when we receive from a Client back. However that is something that should be handled if a change happens. That thus far has not been mentioned. |
I will test this with caddy then merge |
Thanks! |
…rometheus#9431) related: prometheus/client_java#702 fixes prometheusgh-9430 Signed-off-by: Jonatan Ivanov <jonatan.ivanov@gmail.com>
Related: prometheus/client_java#702
Fixes gh-9430
Please let me know if you want me to add a test for this change,
scrape_test.go
checks the Accept header but it ignores the version, I'm not sure you want to tie the tests for it.