Not sure if working as expected or a bug, so reporting it as an enhancement
Currently, when using quarkus-micrometer-registry-prometheus and RestClientBuilder.newBuilder(), metrics are exposed as uri="root"; even if dynamic URI has a defined path.
Small reproducer:
@RegisterRestClient
public interface MyRemoteService {
@GET
Object getStreams();
}
@Path("/hello")
public class GreetingResource {
@GET
public String hello() {
MyRemoteService myRemoteService = RestClientBuilder.newBuilder()
.baseUri(URI.create("https://code.quarkus.io/api/streams"))
.build(MyRemoteService.class);
return myRemoteService.getStreams().toString();
}
}
Sample metrics:
# TYPE http_client_requests_seconds summary
# HELP http_client_requests_seconds
http_client_requests_seconds_count{clientName="code.quarkus.io",method="GET",outcome="SUCCESS",status="200",uri="root"} 1.0
http_client_requests_seconds_sum{clientName="code.quarkus.io",method="GET",outcome="SUCCESS",status="200",uri="root"} 0.3211975
# TYPE http_client_requests_seconds_max gauge
# HELP http_client_requests_seconds_max
http_client_requests_seconds_max{clientName="code.quarkus.io",method="GET",outcome="SUCCESS",status="200",uri="root"} 0.3211975
It shows the expected path/uri when @Path annotations are used instead of Programmatic client creation.
Expected value: /api/streams
Description
Not sure if working as expected or a bug, so reporting it as an enhancement
Currently, when using
quarkus-micrometer-registry-prometheus
andRestClientBuilder.newBuilder()
, metrics are exposed asuri="root"
; even if dynamic URI has a defined path.Small reproducer:
Sample metrics:
It shows the expected path/uri when
@Path
annotations are used instead ofProgrammatic client creation
. Expected value:/api/streams
Implementation ideas
No response