-
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
OpenMetrics exporter does not respect openmetrics format #597
Comments
Also ran in to this today, specifically with the
As pointed out above in the spec:
EDIT: My specific issue was fixed indirectly with a wildfly upgrade from 18->20, but YMMV. |
Did some investigation on this. MP Metric's histogram and timer use https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format says summary includes:
MP Metrics spec (section 4.2.8 / 4.2.9):
|
Note also that MP Metrics uses only |
@trotman23 , I agree with your point about multiple |
@donbourne what about meters, timers, ...? I'm using https://github.com/eclipse/microprofile-metrics/blob/master/tck/rest/src/main/java/org/eclipse/microprofile/metrics/test/MpMetricTest.java#L510 as a reference. Assume you do a parser of the exporter string, it does not match openmetrics - or in a very surprising manner at least. |
The thing with duplicate HELP lines was a bug in SmallRye and therefore WildFly, and is now fixed. Apparently it wasn't detected by the TCK, so we might want to improve that. I filed #616 |
I confirmed we've already addressed the |
@rmannibucau , the MP Metrics export format for openmetrics just relies on counts, gauges and summaries -- so should be interpretable by Prometheus. Is what you're saying that MP Metrics doesn't use the prescribed histogram output for a histogram metric? |
@donbourne openmetrics does not define the format used by mp even if each line is compliant so a praser - potentially not prometheus since it is a spec - can fail being 100% compliant. MP should stay in the 100% defined area. |
@rmannibucau , I feel like I'm still missing something. If we're just using gauges, counters and summaries, as defined by OpenMetrics, I feel like we are being 100% compliant (once we fix the missing sum in summary). can you give example of what we're missing? |
@donbourne spec says "you will get A, B, C or D, E" and Mp does "you get A, B, C, D, E" which is not what spec says but includes it (the relationship is reversed IMHO, MP extended openmetrics where it should comply to it to be compatible). |
That links to JSON output.
The Prometheus Exposition format page does not seem to indicate a limitation on the type of compatible metric types to be used? Now that the sum value has been fixed, not sure what else is uncompliant? |
@Channyboy get your point but it means what I'm complaining about: as a consumer you dont know what you get which is as not having a spec so if we reuse a well known format we should stick to what it enables and define and let the out of scope features stay togglable (off by default) only. So prometheus exporter shouldn't have all the not defined metric types by default at least. |
@rmannibucau I think that is where the confusion where @donbourne and I have. We're not sure what you mean by out of scope features (metric types)? MP uses From https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format I'm not sure where the MP output would cause a conflict? |
Hmm, from master I don't see the issues I hit (and the application which was relying on that dropped mp so can't check easily anymore :s). Let's consider it fixed for now and we'll see later. Maybe it was before openmetrics was fully embrassed (during prometheus -> openmetrics migration?). |
Hi,
Not sure I missed something but using https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format as a reference, it seems mp-metrics does not match the exporter format due to the numerous metric types.
To be portable you must only use counters and gauges - even histograms are not matching.
Wonder if metrics shouldn't be split in metrics-openmetrics (agree name sucks but it is what it is) and metrics which would import the openmetrics part.
Think it is ok to just have counters and gauges in the openmetrics sub-api (this is the main usage since all other ones can be compensated by the backend).
The text was updated successfully, but these errors were encountered: