-
Notifications
You must be signed in to change notification settings - Fork 321
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
Negotiate OM v1.0.0 #475
Negotiate OM v1.0.0 #475
Conversation
Also return OM v1.0.0, and not v0.0.1 Signed-off-by: Goutham Veeramachaneni <[email protected]>
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.
Overall LGTM. Lets merge to solve the fix and see if this can get in the next release.
It feels like we should return 0.0.1 if no version is specified to be backwards compatible |
It kinda goes against the spec as mentioned here: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#overall-structure
|
If the content type really MUST be Or less formally argued: If I announce that I accept OM of any version, then I cannot expect to get 1.0.0 back. If I want 1.0.0, then I have to put it into the accept header in exactly that way. |
The
I guess the specification does not specify the
I think this is a very valid argument and I think the spec-conforming solution would be always returning To think about existing users maybe this could be an ok solution: return |
Signed-off-by: Goutham Veeramachaneni <[email protected]>
@roidelapluie @beorn7 Now returning 0.0.1 with no version for backwards compat. |
@jonatan-ivanov I actually tried to argue that returning v0.0.1 when no version is requested is OK. :) Note that whatever content-type we return, the actual content is the same. Plus, the Go implementation of OpenMetrics isn't even complete yet. And second-order plus, there is a discussion if we should go for v1.1 or even v2.0 instead of trying to fully implement v1.0. So the discussion is a bit academic at this point. I think with this PR, we should fix the current behavior of not even returning v1.0.0 even when requested, but we should try to change as little as possible to minimize breakages at this point. @jonatan-ivanov and @bboreham I see your points, and this should be discussed. But by not changing the behavior now, we still keep the door open for changes in the future. While changing more than needed right now might create breakage noise that we might not need to create, e.g. if "the real thing" will be OM v1.1 or v2.0 anyway. |
Also return OM v1.0.0, and not v0.0.1
Fixes #456