August 2019
Intermediate to advanced
256 pages
6h 43m
English
Server-wide tags are set via the environment variable, MP_METRICS_TAGS, as shown:
export MP_METRICS_TAGS=app=myShopjava -jar target/metrics-thorntail.jar
These tags will be added to all metrics defined in the server and also added to the respective output format.
So, given the preceding command, a counter, @Counted(absolute=true) int myCount;, would end up in Prometheus as follows:
# TYPE application:my_count counterapplication:my_count{app="myShop"} 0
Read now
Unlock full access