Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide way to set default tags for all metrics #5

Open
domdorn opened this issue Sep 2, 2022 · 1 comment
Open

Provide way to set default tags for all metrics #5

domdorn opened this issue Sep 2, 2022 · 1 comment
Labels
enhancement New feature or request Hackathon help wanted Extra attention is needed

Comments

@domdorn
Copy link

domdorn commented Sep 2, 2022

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⏎
@atooni atooni added enhancement New feature or request help wanted Extra attention is needed labels Nov 13, 2022
@Grryum
Copy link
Contributor

Grryum commented Jun 23, 2023

seems that this issue should be addressed to zio repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hackathon help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants