-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Rest-client extension does not record any metrics about client calls #13847
Comments
/cc @jmartisk, @phillip-kruger |
We don't currently support any metrics associated with rest clients. There are metrics for the server side (statistics how often each REST method is called and how long it takes) if you use the SmallRye Metrics extension. It's enabled by setting With the Micrometer extension, we support a lower-level approach of gathering metrics on the HTTP (Vert.x) layer, enabled by |
/cc @ebullient |
@jmartisk Do you think this should exist? What do you think? Is any of these a viable solution? (I am creating an interceptor. If you agree please let me know whether I should add to the rest-client or the micrometer extension) |
You can certainly create a client interceptor to emit metrics as a near term (use the appropriate API for the metrics extension you're using). We can also add support for http client metrics to the micrometer extension (which will capture outbound vert.x requests). I'll get started on that after publishing a few things today. If you'd like to help, that's cool. ;) |
@ebullient I will get something started. |
Ok. For the micrometer extension, I'll be emulating this for clients: https://github.com/quarkusio/quarkus/blob/master/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxHttpServerMetrics.java (to emit metrics akin to what Spring actuator emits, as a reasonable baseline) |
I am trying this right now, but I cannot get it called, because it seems that using the resteasy does not create an HttpClientImpl |
Y. I double checked -- resteasy client goes straight out using apache http client, that's why I hadn't added the vert.x based instrumentation. So we'll want client request/response filters.. And I think we may be able to keep those in the rest-client extension in this case .. I'll probably crib from what you get working.. |
I just got the client filters to work, see oscarfh/quarkus-rest-metrics@4b500e5 I will start working on a PR to get the rest-client extension to create these filters. |
ContainerRequestFilter / ContainerResponseFilter are server side? |
I followed the official documentation to create an app that uses the rest-client extension to make http calls.
I also added the micrometer lib to the project, so I get metrics.
My expectation is that I can get out-of-the-box metrics about rate, latency (percentiles), errors, etc on the clients calls.
But when I execute my example (and call localhost:8080/country/name/{name}), I do not see any client related metrics, even though I can see the result of the client call on my browser.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: