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

Clients SHOULD have unique metric IDs (name + tags) #12

Open
shakuzen opened this issue Jul 19, 2019 · 2 comments
Open

Clients SHOULD have unique metric IDs (name + tags) #12

shakuzen opened this issue Jul 19, 2019 · 2 comments

Comments

@shakuzen
Copy link
Member

shakuzen commented Jul 19, 2019

If multiple applications/instances use the client and are scraped by the proxy application but they use the same metric names and tags, there will be duplicate time series in the Prometheus scrape (possibly with different values). Prometheus will only store one of these time series. The instance or job labels Prometheus adds will not help here because they will correspond to the Proxy application, not the Client application.

@making
Copy link
Contributor

making commented Jul 19, 2019

For my demo application on CF, I'm using following properties which are compatible with Promregator

management.metrics.tags.org_name=demo
management.metrics.tags.space_name=${cloud.application.space_name:demo}
management.metrics.tags.app_name=${cloud.application.application_name:demo}
management.metrics.tags.cf_instance_id=${cloud.application.application_id:demo}:${cloud.application.instance_index:0}
management.metrics.tags.cf_instance_number=${cloud.application.instance_index:0}

https://github.com/making/demo-micrometer/blob/master/src/main/resources/application.properties#L8-L12

@shakuzen shakuzen changed the title Client applications SHOULD have unique metric IDs (name + tags) Clients SHOULD have unique metric IDs (name + tags) Jul 19, 2019
@ToWi87
Copy link

ToWi87 commented Jul 21, 2020

Maybe I am also not fully understanding how this proxy is supposed to work, but here my problem:
There are 2 apps emitting the same metrics behind a proxy. Now going to the proxy's /metrics/connected endpoint will yield one big list with both apps' metrics. Do I have any chance from there on to identify which metric is coming from which app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants