-
Notifications
You must be signed in to change notification settings - Fork 36
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
Timed - difference between Prometheus and JSON format #40
Comments
[#40] fix unit scaling for Prometheus exporter, add test
merged in master, so AFAIK (there are no separated 2.0.x/1.1.x branches yet) it should be fixed in 1.1.3 and 2.0.0 when released |
There's already a 1.x branch, and master should be moved to 2.x |
Ok I'll send PRs with backports of my stuff from master to 1.x |
Not sure things need to be backported, is there expectation of another 1.x release? |
Well, is 1.x branch aiming for 1.2, 1.3, etc or 1.1.3, 1.1.4,etc.? (in the latter case it would make more sense if it were named 1.1.x). Are 1.1.x releases required for WildFly/EAP updates? @rsvoboda |
I believe 1.x branch is aimed at 1.1.3 right now, however there won't be any 1.2 releases so I'm fine with it being 1.x right now. I don't know what their plans are for updates at present. |
Ok, in that case the backports to 1.x branch are valid and aimed towards 1.1.3, I suppose WildFly will use it at some point. |
Maybe, but from an upstream perspective we're not planning to do a 1.1.3 release at all, as 2.0 will supersede it |
[#40] fix unit scaling for Prometheus exporter, add test
I don't know what's the plan around the 2.0 release, but I spotted this problem in current Thorntail 2.3.0.Final-SNAPSHOT, and I know the problem wasn't there before (as we have a test for it in the Thorntail standalone test suite). So this is actually a regression. If I wanted to have this fixed in Thorntail 2.3.0, would 1.1.3 be doable? |
Based on the decision the other day for Metrics 2.0 to not be part of MP 2.2 in Feb, it would be fine to do another Metrics 1.x release. @jmartisk, are there any other items that should be done before a release? |
Can we get #39 fixed for 1.1.3 ? |
@jmartisk Looking to WF + SmallRye Matrics from 1.x branch, 2.8836E-5 / 60 = 4.806E-7
And to OpenLiberty:
So the WF (with SmallRye Metrics 1.1.3-SNAPSHOT) has still different behaviour than OpenLiberty. Can you confirm that WF (with SmallRye Metrics 1.1.3-SNAPSHOT) doesn't violate the spec? |
@marekkopecky I think SR is now correct on this. The difference is because JSON format uses the unit that you specify for your metric (https://github.com/eclipse/microprofile-metrics/blob/1.1/spec/src/main/asciidoc/metrics_spec.adoc#315-timer-json-format) ( You see that your example contains My fix changed the behavior so that Prometheus really converts to seconds, before that there was some completely messed up conversion where the time in nanoseconds (which is the unit for internal storage) was divided by 60 and that was then presented as seconds, I think. If on OpenLiberty, with a timer with unit=minutes, you're getting the same number with JSON and Prometheus output, then I think it's incorrect. If I understand the spec correctly in that JSON output should use the configured unit of the metric, and Prometheus output should always seconds. If you want then drop by at my desk and we can dive into it :) |
Clarification issue: microprofile/microprofile-metrics#320 |
There are differences in reported results between Prometheus and JSON format.
When using the same deployment with OpenLiberty there are no differences in reported results between Prometheus and JSON format.
Code
SmallRye Metrics via WF:
OpenLiberty:
Code: https://github.com/rsvoboda/rsvoboda-playground/blob/master/microprofile-metrics-hello-prometheus/src/main/java/com/sebastian_daschner/hello_prometheus/CoffeesResource.java#L69
The text was updated successfully, but these errors were encountered: