feign
feign copied to clipboard
How to monitor dynamic URLs using feign-micrometer
@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
I solved this problem see:https://github.com/jmilktea/jtea/blob/master/spring%20cloud/feign/feign%E7%9B%91%E6%8E%A7.md