Open
Description
openedon Jul 9, 2024
Description
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
Implementation ideas
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
Out of scope