Open llowinge opened 1 year ago
/cc @brunobat (micrometer), @ebullient (metrics,micrometer), @jmartisk (metrics)
The problem is that the Prometheus endpoint is, by default, configured to listen on /metrics/*
, and if you configure JSON to be on /metrics/json
, then the paths collide and the Prometheus endpoint seems to take precedence in handling the request.
So I guess you either need to completely disable Prometheus (remove the quarkus-micrometer-registry-prometheus
dependency) or configure the JSON endpoint to be on a different path that doesn't collide with the Prometheus path - which is what the linked documentation is doing (it changes the Prometheus path to /metrics/prometheus
).
@jmartisk Even if i add quarkus.micrometer.export.prometheus.path = metrics
it still returns (on path metrics/json
) Prometheus format output. This looks to me like a bug, because it is preventing me to use metrics/json
for JSON and metrics
for Prometheus. It should atleast be documented, even it looks to me like a bug. Thank you in advance.
Btw. why it is configured to listen on /metrics/*
?
I'm not completely sure why it listens on subpaths as well (I think it doesn't allow you to change anything by appending something to the request URL), maybe @ebullient has an explanation
Describe the bug
According to https://quarkus.io/guides/micrometer#management-interface i can enable JSON export with
but that doesn't work (
curl "localhost:9000/q/metrics/json"
still returns Prometheus format output) unless i add alsoWhich looks to me like a bug. Why i cannot specify only the JSON endpoint and benefit from it ?
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
Use these two dependencies
and play with the properties mentioned in description.
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev