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
Micrometer compatibility mode for Metrics #6544
Comments
The main obstacle in the road that I currently see is that the MP Metrics implementation works with the base/application/vendor scopes (as is required by the spec) and prepends the scope of each metric before its name in the Prometheus output. Micrometer doesn't do anything like that. |
Couldn't you just add some sort of aliases if a configuration property is enabled? |
@ebullient I think you were also interested in this? |
The metrics that Micrometer exposes are actually quite different. For example MP Metrics has a |
@jmartisk makes perfect sense! |
Just as commentary, jvm_* (as done by Spring micrometer) is more parallel to what other runtimes do, e.g. the default labels used by a popular nodejs prometheus client: https://www.npmjs.com/package/prom-client The micrometer implementation is also pulling in/referincing the prometheus java client: https://github.com/micrometer-metrics/micrometer/blob/master/implementations/micrometer-registry-prometheus/build.gradle .. To me, this means they are using "recommended" labels, in addition to providing their own Spring magic naming conventions for custom metrics. Example from the prometheus java client: https://github.com/prometheus/client_java/blob/master/simpleclient_hotspot/src/main/java/io/prometheus/client/hotspot/MemoryPoolsExports.java |
After some more thinking, I guess we'll have to place these JVM metrics in the This holds under the assumption that we want to keep other metrics unaffected - but I guess we do, because
So TLDR, my plan is that this mode will:
Any objections? |
I think it's a valid first step |
I have a prototype ready, it will need changes in SmallRye Metrics to get in first, then we can upgrade it in Quarkus. It means quite a lot of bending of the MP Metrics specification, but it seems that I managed to bend the By the way none of these metrics work in native mode. |
As alternative (experiment), I created a quarkus extension to use micrometer directly: https://github.com/ebullient/quarkus-micrometer-extension |
Users migrating from Spring Boot and Micrometer might want to expose the same JVM metrics as they used to, so that they don't have to rework their Grafana dashboards.
The naming and organization of base/vendor metrics exposed by Quarkus is different than what Micrometer does, so it would be useful to have a configuration option that changes them to align with that scheme. In particular, we should mimic the way how
jvm
metrics are handled in https://github.com/micrometer-metrics/micrometer/tree/master/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm so we will have to add some new metrics that we don't normally have, and change metadata of some metrics that we do normally haveThe text was updated successfully, but these errors were encountered: