Micrometer support for fully qualified metrics names #27983
Replies: 2 comments 3 replies
-
/cc @ebullient, @jmartisk |
Beta Was this translation helpful? Give feedback.
-
The short answer is no. Are you using MP annotations, or looking for built in metrics? While MP Metrics does use fully qualified classnames + method names, it is true that Micrometer does not (unless you configure it that way). General conventions for metrics are not class/package name bound. Consider the case that you made another class that serves a similar purpose but uses slightly different method names and wanted to aggregate across those... Micrometer makes a best effort at setting you down that path. I can look at adding the full class name as a tag.. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to migrate from microprofile to micrometer metrics in my project. The current implementation uses the fully qualified metrics names. For example, if I have a metrics with name "totalCount" in the class com.org.github.MicrometerMetrics the way I am accessing the metrics is by using the key: "com.org.github.MicrometerMetrics.totalCount"
When I switched to microprofile the default names of metrics changes from the fully qualified names to just the metrics name. Meaning now I have to access the metrics using the key: "totalCount"
This makes the migration complex as I would have to change the name of the metrics to make them meaningful without the fully qualified name and also I have to change the key to access the metrics
Is there a way in micrometer to get the metrics by fully qualified names which includes package name and class name along with the metrics name?
Beta Was this translation helpful? Give feedback.
All reactions