quarkus
quarkus copied to clipboard
/q/metrics is unavailable after Bump Micrometer to 1.13
Describe the bug
/q/metrics endpoint is unavailable after Bump Micrometer to 1.13 - https://github.com/quarkusio/quarkus/pull/42661
Noticed due to failure of daily https://github.com/quarkus-qe/beefy-scenarios/actions with the build over night, tests in 015-quarkus-micrometer module are getting 404 when requesting /q/metrics. The same can be faced in dev mode.
When I reverted the bump commit /q/metrics is available again.
See How to Reproduce? for reproducer steps.
Expected behavior
/q/metrics is available
Actual behavior
/q/metrics is unavailable
How to Reproduce?
git clone https://github.com/quarkus-qe/beefy-scenarios
mvn clean quarkus:dev -pl 015-quarkus-micrometer
curl http://localhost:8081/q/metrics ## or open http://localhost:8081/q/metrics
Make sure to use the latest Quarkus main
Running with 3.14 ( mvn clean quarkus:dev -pl 015-quarkus-micrometer -Dquarkus.platform.version=3.14.0) has metrics available.
Output of uname -a or ver
macOS
Output of java -version
Java 21
Quarkus version or git rev
Quarkus main
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
/cc @brunobat (micrometer), @ebullient (metrics,micrometer), @jmartisk (metrics)
CC @gsmet as I think Micrometer bump was also considered for backport
@rsvoboda you need to change the following dependency:
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
to:
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
</dependency>
PR created: https://github.com/quarkus-qe/beefy-scenarios/pull/502
@rsvoboda you need to change the following dependency:
<dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency>to:
<dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus-simpleclient</artifactId> </dependency>
Updated the description of the bump PR to highlight this. However, this is not required inside a Quarkus app because the Prometheus registry uses this and exposes the classes to the users.
Right.. I was going to ask why this is being specified directly (rather than relying on the dependency through the quarkus micrometer prometheus extension?
This is incorrect:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-micrometer</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
It should be (as documented):
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-micrometer-registry-prometheus</artifactId>
</dependency>
Just looking into the same, the scenario was added in January 2021, So probably early days of Micrometer integration on Quarkus side.
But still strange that /q/metrics is unavailable. Could we get a warning?
FYI, I will switch the app to quarkus-micrometer-registry-prometheus.
There are quarkus integration tests that rely on the prometheus metrics endpoint being present. I'm not sure what the setup difference is between those and this.
But still strange that /q/metrics is unavailable. Could we get a warning?
Or maybe a hint in https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.16#micrometer about unavailable /q/metrics in case of direct io.micrometer:micrometer-registry-prometheus usage in the app.
in case of direct
io.micrometer:micrometer-registry-prometheususage in the app.
Was that the issue?
Seems to be fixed in https://github.com/quarkus-qe/beefy-scenarios/pull/503, requiring no changes if your project uses io.quarkus:quarkus-micrometer-registry-prometheus already.
Can we close this one, @rsvoboda ?
Yes, https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.14#micrometer mentions use-case with /q/metric