#2664·feign

How to monitor dynamic URLs using feign-micrometer

Author: jmilkteaCreated Nov 22, 2024Updated Jun 18, 2026
Labelsquestionspring-cloud
@FeignClient(name = "my-service")
public interface MyClient {

    @PostMapping(consumes = "application/json", headers = {"Content-Type=application/json;charset=utf-8"})
    Response getApi(URI uri, @RequestBody String reqBody);
}

In my scenario, the URL is changing, so I use it as a parameter and use a feign method. But I found that the relevant monitoring can only be at the method level. Can I monitor the URL level? I really need it.

actuator: feign_Feign_seconds_count{client="MyClient",method="getApi",port="8080"} 8156.0 feign_Feign_seconds_sum{client="MyClient",method="getApi",port="8080"} 807.2327363