-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Promtool should support openmetrics #8932
Comments
Hi, does this mean check openmetrics format like check prom text format, could you tell me? |
This issue is to add support for |
Thanks, i would like to try if not anybody is working on this. |
Hi, i'm a little confused about the check rule. Do we parse the text wire openmetrics format into prometheus MetricFamily, and then encoded the metrics into bytes stream, at last use promlint package to do the check? need your help, thanks :) @roidelapluie |
This issue would require a openmetrics text parser in go, which does not exist at the moment. We only have a textformat parser in go. |
Here is the textparser in go: https://github.com/prometheus/common/blob/main/expfmt/text_parse.go |
Thanks, i'm understanding the issue better! |
Is this Issue still valid and can I try it? :) |
I think so, especially that prometheus supports back filling from openmetrics #8084 |
Hello from the bug scrub! @jyz0309 are you still willing to work on this? We'll happily assign this issue to you (or to others that want to help with it). Note that it requires an implementation of an OpenMetrics parsers in https://github.com/prometheus/common/tree/main/expfmt , so it's a bit of work and maybe not as easy as it looks. |
@beorn7 Hello! I want to ask sth about the parser in |
Yeah, good question. So the source of dissonance here is that the encoders and parsers in https://github.com/prometheus/common/tree/main/expfmt are all based on https://github.com/prometheus/client_model , which in turn represents the data model behind the classic Prometheus text format. (OpenMetrics in fact has its own protobuf spec here.) As the encoder is also just encoding from the classic Prometheus protobuf, let's do what you said above, i.e. implement a parser that supports everything we can easily put into the classic Prometheus protobuf. We can later decide if we want to convert info and stateset into other metrics (which is essentially what Prometheus itself is doing right now upon ingestion) or add support for it into the classic protobuf or port the whole shebang to the OpenMetrics protobuf (which isn't that different after all). |
prometheus/common#669 |
Promtool should support openmetrics, next to the text format.
Maybe via --format=openmetrics
The text was updated successfully, but these errors were encountered: