feign icon indicating copy to clipboard operation
feign copied to clipboard

How to monitor dynamic URLs using feign-micrometer

Open jmilktea opened this issue 1 year ago • 1 comments

@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

jmilktea avatar Nov 22 '24 08:11 jmilktea

I solved this problem see:https://github.com/jmilktea/jtea/blob/master/spring%20cloud/feign/feign%E7%9B%91%E6%8E%A7.md

jmilktea avatar Nov 28 '24 03:11 jmilktea