Tags can also be supplied on a per-metric basis:
@Counted(tags=[“version=v1”,”commit=abcde”])void doSomething() { [...]}
This example defines two labels, version=v1 and commit=abcde, on the metric with the name doSomething. Those will be merged with the global tags for the output. With the preceding global tag, there would thus be three tags in the output.
In this section, we have seen how to add labels to metrics to provide additional metadata. These can be global, for all metrics exposed from a server, or application-specific, for one single metric.