Add support to assign dynamic tag into existing metric
See original GitHub issueFrom slack thread it would be nice to have ability to define only dynamic part in metric while metric with static tags can be defined only once:
registry.timer("my.timer", "static", "tag", "response", response.status()).record(1);
->
Timer myTimer = registry.timer("my.timer", "static", "tag")
...
myTimer.withTags("response", response.status()).record(1);
where withTags
returns new instance of timer with additional tags attached.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:58
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Spring Boot Metrics with Dynamic Tag Values - DZone
In our message receiver constructor, we create a TaggedCounter, noting the name of the counter and the name of the tag. No values....
Read more >Dynamic tag values for the Counter metric in Micrometer
I'm stuck here and have to create different counter variables for each combination of tag values and the readability of the code gets...
Read more >Dynamic Meters and Metrics with Micrometer | by Aviad Pines
Since in Micrometer, a meter ID is defined by its name and tags (key-value pairs), the tag value determines the meter, and different...
Read more >Using dynamic labels - Amazon CloudWatch
If you use a dynamic label with a search expression, the dynamic label applies to every metric returned by the search. You can...
Read more >Assigning Tags - Datadog Docs
Assign host tags in the UI using the Host Map page. Click on any hexagon (host) to show the host overlay on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@zeratul021 It is possible to use dynamic tags now though, simply by registering it as you use it. If the meter already exists, Micrometer will return the existing one.
https://dzone.com/articles/spring-boot-metrics-with-dynamic-tag-values - link to the source inside the article