Remove _total suffix in micrometer using NamingConvention not working in 2.5.0
See original GitHub issueDescribe the bug
I like to remove some suffix in some name metrics, i made it using NamingConvention from micrometer and set it in PrometheusMeterRegistry. This was working just fine in quarkus 1.13.7, but when i change it to quarkus 2.5.0 doesn’t.
Maybe this is a change in micrometer lib or in quarkus?
Thanks
Expected behavior
In quarkus 1.13.7 using micrometer-quickstart example with my namingConvention to remove _total suffix from counter metrics works just fine.
Actual behavior
In quarkus 2.5.0 using micrometer-quickstart example with my namingConvention to remove _total suffix from counter metrics doesn’t remove suffix like quarkus 1.13.7.
How to Reproduce?
Reproducer:
Steps to reproduce the behavior:
1. Clone my [project](https://github.com/quarkusio/quarkus-quickstarts/tree/main/micrometer-quickstart) from micrometer-quickstart
1. Remove the comments to change quarkus version (test with quarkus 1.13.7 and quarkus 2.5.0)
2. Call endpoint http://localhost:8080/example/prime/31 or http://localhost:8080/example/prime/70
3. Call endpoint http://localhost:8080/q/metrics search for example_prime_number metric
Output of uname -a
or ver
Darwin MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
Output of java -version
openjdk version “11.0.2” 2019-01-15
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.5.0
Build tool (ie. output of mvnw --version
or gradlew --version
)
apache-maven-3.8.1
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
@ebullient I make some tests and make a downgrade to version 1.6.5 of the micrometer-core and micrometer-prometheus registry, that is used in quarkus 1 and worked just fine in quarkus 2.
I will open an issue in micrometer about it.
i made the replace in pom like this in my project
Using a filter with the scrape will be fine, as that is running elsewhere (in Prometheus-land, not in your app). This kind of scrape-config adjustment is pretty common.