I have many interfaces with @FeignClient annotations, and I provide name, url and config class parameters inside annotation.
I got this libraries in my project:
implementation("io.github.openfeign:feign-micrometer:13.5")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("org.springframework.cloud:spring-cloud-starter-openfeign")
I need to add custom label "name"=%name from annotation% to feign metric http_client_requests_seconds_**
How can I do that? Of course, name should must match the feign client name, either take it from the annotation or somehow set it statically.
I tried to create custom bean MicrometerCapability(meterRegistry, mapOf("name" to "feign-name-example") in config class and add it for particular feign client in config param, but this led to adding this label to all metrics in my app, even not related to feign client ones (like jvm, kafka, hikaricp and others)