micronaut-projects / micronaut-micrometer

Integration between Micronaut and Micrometer
Apache License 2.0
36 stars 65 forks source link

Add custom tags to micronaut metrics #779

Open Dbasdeo opened 4 months ago

Dbasdeo commented 4 months ago

Feature description

We have been trying to add custom tags to metrics and it is proving to be very difficult.

We would like to add a custom tag to timing metrics like server request timers and client request timers in order to associate data in a way that makes our graphs easier to read.

The only solution we have come up with so far is to disable the metric, pull out the code for the metrics and add a line for our metric.

It would be much easier if we could:

hrothwell commented 3 months ago

Have you looked at all at this?

Probably not entirely helpful given your use case at it sounds like you are specifically trying to add on to the built in server/client/etc metrics that might be generated by Micronaut (tbh I don't know exactly what/if things are auto set by Micronaut), but might still be helpful. See also this annotation that works alongside it