We are using Spring Boot 2.7.8 and the micrometer-registry-prometheus dependency to capture metrics.
We use feign-reactor-webclient:3.2.6 to call out to another service. The metrics being generated by this call contain the actual values in the URI instead of the templated values.
For example, in the /actuator/prometheus
endpoint, I see entries like this:
http_client_requests_seconds_count{clientName="someClient",method="GET",status="200",uri="/person/lookup?firstName=Tony&lastName=Soprano",} 1.0
I would expect to see the variable names rather than the values, like this:
http_client_requests_seconds_count{clientName="someClient",method="GET",status="200",uri="/person/lookup?firstName={firstName}&lastName={lastName}",} 1.0
Is there a way to get the default http.client.requests
metric values to use the templated values for the URI tag?
The Reactive Feign package
com.playtika.reactivefeign:feign-reactor-spring-cloud-starter
contains a property calledreactive.feign.metrics.enabled
, which is disabled by default, but when enabled will record metrics with the URI template. You can read https://github.com/PlaytikaOSS/feign-reactive/tree/develop/feign-reactor-spring-configuration for more details.Related Issues:
Related Code: