Skip to content
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

/q/metrics is unavailable after Bump Micrometer to 1.13 #42801

Closed
rsvoboda opened this issue Aug 27, 2024 · 14 comments
Closed

/q/metrics is unavailable after Bump Micrometer to 1.13 #42801

rsvoboda opened this issue Aug 27, 2024 · 14 comments
Labels

Comments

@rsvoboda
Copy link
Member

rsvoboda commented Aug 27, 2024

Describe the bug

/q/metrics endpoint is unavailable after Bump Micrometer to 1.13 - #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

@rsvoboda rsvoboda added the kind/bug Something isn't working label Aug 27, 2024
Copy link

quarkus-bot bot commented Aug 27, 2024

/cc @brunobat (micrometer), @ebullient (metrics,micrometer), @jmartisk (metrics)

@rsvoboda
Copy link
Member Author

CC @gsmet as I think Micrometer bump was also considered for backport

@gastaldi
Copy link
Contributor

@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>

@gastaldi
Copy link
Contributor

PR created: quarkus-qe/beefy-scenarios#502

@brunobat
Copy link
Contributor

brunobat commented Aug 27, 2024

@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.

@ebullient
Copy link
Member

ebullient commented Aug 27, 2024

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>

@rsvoboda
Copy link
Member Author

Just looking into the same, the scenario was added in January 2021, So probably early days of Micrometer integration on Quarkus side.

@rsvoboda
Copy link
Member Author

But still strange that /q/metrics is unavailable. Could we get a warning?

FYI, I will switch the app to quarkus-micrometer-registry-prometheus.

@ebullient
Copy link
Member

ebullient commented Aug 27, 2024

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.

@rsvoboda
Copy link
Member Author

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.

@ebullient
Copy link
Member

in case of direct io.micrometer:micrometer-registry-prometheus usage in the app.

Was that the issue?

@gastaldi
Copy link
Contributor

Seems to be fixed in quarkus-qe/beefy-scenarios#503, requiring no changes if your project uses io.quarkus:quarkus-micrometer-registry-prometheus already.

@brunobat
Copy link
Contributor

brunobat commented Sep 9, 2024

Can we close this one, @rsvoboda ?

@rsvoboda
Copy link
Member Author

rsvoboda commented Sep 9, 2024

Yes, https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.14#micrometer mentions use-case with /q/metric

@rsvoboda rsvoboda closed this as completed Sep 9, 2024
@github-project-automation github-project-automation bot moved this from Planned to Done in WG - Quarkus 3.15 LTS Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

4 participants