You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using Spring Boot 2.4.3 with micrometer 1.6.4
When I create a PrometheusMeterRegistry, and populate it with a timer with one set of dimensions, and then another timer with a different set of dimensions for the same metric name, the output from PrometheusMeterRegistry.scrape() only includes the first set of dimensions. It does not include the data for same operation name but different dimensions.
This is expected behavior currently due to the limitation that the Prometheus client does not allow meters with the same name and a different set of labels. There is #877 to see if we can work around the limitation in the Prometheus client. Otherwise we suggest you abide by the limitations set by the Prometheus client. It's unfortunate portability-wise since other registries tend to not have this limitation.
Duplicate of #877
It's not a limitation of the prometheus client but just the way the prometheus-micrometer integration is written.
It is totally possible to collect metrics with different tags, MicrometerCollector needs to be changed to store label names dynamically like it does for label values. I raised a PR with a basic fix to the issue #2653
Hello, I am using Spring Boot 2.4.3 with micrometer 1.6.4
When I create a PrometheusMeterRegistry, and populate it with a timer with one set of dimensions, and then another timer with a different set of dimensions for the same metric name, the output from PrometheusMeterRegistry.scrape() only includes the first set of dimensions. It does not include the data for same operation name but different dimensions.
Here is a fully working test case:
The output is:
The expected output should also contain metrics for operationName with tagA="valueA",tagB="valueB"
Note that calling
meterRegistry.getMeters()
does correctly return the 3 different PrometheusTimer objects.The text was updated successfully, but these errors were encountered: