prometheus-rsocket-proxy
prometheus-rsocket-proxy copied to clipboard
Clients SHOULD have unique metric IDs (name + tags)
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.
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
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?