quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.79k stars 2.68k forks source link

Add exception tag in microprofile vertx http server metric #27675

Open bosofelipe opened 2 years ago

bosofelipe commented 2 years ago

Description

I´m using micrometer in quarkus and enable the following envs

quarkus.micrometer.registry-enabled-default=true
quarkus.micrometer.binder-enabled-default=true
quarkus.micrometer.binder.vertx.enabled=true
quarkus.micrometer.binder.mp-metrics.enabled=true
quarkus.micrometer.binder.http-client.enabled=true
quarkus.micrometer.binder.http-server.enabled=true

But when using the metric http_client_requests_seconds_count doesn´t have the exception tag like in micrometer default

My previous metric using a spring/micrometer

http_server_requests_seconds_count{**exception="MyException"**, method="POST", outcome="SERVER_ERROR", status="500", uri="/v1/reverse_tracking"}

My new metric based on quarkus micrometer vertex, without exception tag :/

http_server_requests_seconds_count{method="POST", outcome="SERVER_ERROR", status="500", uri="/v1/reverse_tracking"}

Is this problem is a lack of implementation, or is possible config to appear?

Implementation ideas

No response

quarkus-bot[bot] commented 2 years ago

/cc @ebullient, @jmartisk

ebullient commented 2 years ago

Lack of impl. The client metrics right now are based on rest client filters because vertx is not used for client outbound requests for resteasy classic though it is for resteasy reactive, so we have a bit of a least common denominator in effect at the moment. This is related to #25951 .. which we're also looking at fixing.

geoand commented 2 years ago

@ebullient but this issue looks to be about the server metrics, right?

ebullient commented 2 years ago

But when using the metric http_client_requests_seconds_count doesn´t have the exception tag like in micrometer default

No. He showed the server metric in cut/paste.. but I know we have some gaps w/ client exception handling. Invocation paths are fairly different between the two, so we should just cover both... One of the challenges we have with RR is having the filter invoked with the thrown exception (as I'm not sure where that is caught and if it is stashed anywhere off the top of my head.. )