Skip to content

Vertx HTTP Client Metrics missing #48116

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

Open
AjaySRathore opened this issue May 28, 2025 · 9 comments · May be fixed by #48145
Open

Vertx HTTP Client Metrics missing #48116

AjaySRathore opened this issue May 28, 2025 · 9 comments · May be fixed by #48145

Comments

@AjaySRathore
Copy link

AjaySRathore commented May 28, 2025

Describe the bug

Vertx Http Client metrics like http.client.queue.size and http.client.queue.delay are missing when using REST Client.
I am trying to expose prometheus metrics but only http_client_request_seconds_count and http_client_request_seconds_sum are exposed.

To enable http client metrics I have set the config

micrometer:
  binder:
    http-client:
      enabled: true

Upon further investigation I notice that VertxMeterBinderAdapter:99
doesn't bind metrics if clientName is null. And there is no config that allows to set clientName.

Expected behavior

Get http_client_queue_delay, http_client_queue_size and http_client_pending metrics.

Actual behavior

No such metrics are exposed.

How to Reproduce?

Steps for Reporducing

  1. Run quarkus project from: https://github.com/AjaySRathore/quarkus-nasaopenapi-apod
  2. Call localhost:8080/hello to access endpoint.
  3. Call localhost:8080/metrics to access prometheus metrics. VertxHttpClientMetrics are missing from this endpoint. Such as
    Timer.builder("http.client.queue.delay") is missing. As can be seen in the image below these are the only http_client metrics available.
Image

Expected Behavior would be have access to these metrics.

Output of uname -a or ver

No response

Output of java -version

Java 21

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.9

Additional information

No response

@AjaySRathore AjaySRathore added the kind/bug Something isn't working label May 28, 2025
Copy link

quarkus-bot bot commented May 28, 2025

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

@geoand
Copy link
Contributor

geoand commented May 29, 2025

Can you please attach a sample I can use to debug this as it's not exactly clear to me that the issue is exactly as what is described.

Thanks

@geoand geoand added the triage/needs-reproducer We are waiting for a reproducer. label May 29, 2025
@AjaySRathore
Copy link
Author

@geoand I have added a small project that you can run to see the issue.

@geoand geoand removed the triage/needs-reproducer We are waiting for a reproducer. label May 30, 2025
@geoand
Copy link
Contributor

geoand commented May 30, 2025

@ebullient for the Vert.x Client part I see the Javadoc say that metricName should follow the prefix|client name convention. What is the prefix meant to be?

@geoand
Copy link
Contributor

geoand commented May 30, 2025

#48145 is what we'll need, I just need to know what to use as a prefix

@AjaySRathore
Copy link
Author

#48145 is what we'll need, I just need to know what to use as a prefix

@geoand is this a question for me? I am assuming you are asking @ebullient right?

@geoand
Copy link
Contributor

geoand commented May 30, 2025

Correct

@geoand
Copy link
Contributor

geoand commented May 30, 2025

Actually #48145 would cause http.client.requests to be logged twice (with different data) which is obviously not what we want.

@geoand
Copy link
Contributor

geoand commented May 30, 2025

@ebullient I wonder if we should remove

responseTimes = Timer.builder(config.getHttpClientRequestsName())
.description("Response times")
.withRegistry(registry);
completely...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants