I need to have a way to add certain tags to all metrics, e.g. I want to globally create a tag "application" with value "myApp" that then gets added to all metrics, e.g.
the response from the prometheus endpoint:
$ curl -i http://localhost:8080/metrics
HTTP/1.1 200 OK
content-type: text/plain
content-length: 278
# TYPE count_all_requests counter
# HELP count_all_requests Some help
count_all_requests{method="POST",handler="/users"} 2.0 1655210796102
# TYPE count_all_requests counter
# HELP count_all_requests Some help
count_all_requests{method="GET",handler="/users"} 1.0 1655210796102⏎
changes to
$ curl -i http://localhost:8080/metrics
HTTP/1.1 200 OK
content-type: text/plain
content-length: 278
# TYPE count_all_requests counter
# HELP count_all_requests Some help
count_all_requests{application="myApp",method="POST",handler="/users"} 2.0 1655210796102
# TYPE count_all_requests counter
# HELP count_all_requests Some help
count_all_requests{application="myApp",method="GET",handler="/users"} 1.0 1655210796102⏎
I need to have a way to add certain tags to all metrics, e.g. I want to globally create a tag "application" with value "myApp" that then gets added to all metrics, e.g.
the response from the prometheus endpoint:
changes to