You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reporting Prometheus metrics, it's sometimes useful to always append a certain set of dimensions to every published metric (e.g. nodeId, appName, etc.).
Motivation Behind Feature
We don't control metrics creation in dependencies and can't set dimensions to their metrics. This would mean we won't be able to distinguish such metrics published from different apps or nodes.
Feature Description
PrometheusClient may accept a set of common dimensions it'll append to every published metric.
Which is not ideal because it will only work when I publish metrics via swift-metrics api. If need custom buckets/quantiles I'll have to set dimensions manually.
The text was updated successfully, but these errors were encountered:
@avolokhov Thanks for opening this issue! I think this is a great feature to add.
However, with regards to "identifying metrics", the prometheus backend will automatically add job and instance labels to ALL metrics. Job being the job_name and instance being the host:port of the instance the metric was scraped from. I would suggest using these when possible, instead of adding them manually.
For other use-cases, I will look into adding base labels to PrometheusClient 👍
Feature Request
When reporting Prometheus metrics, it's sometimes useful to always append a certain set of dimensions to every published metric (e.g. nodeId, appName, etc.).
Motivation Behind Feature
We don't control metrics creation in dependencies and can't set dimensions to their metrics. This would mean we won't be able to distinguish such metrics published from different apps or nodes.
Feature Description
PrometheusClient may accept a set of common dimensions it'll append to every published metric.
I can see it might clash with current
Labels
signature and may require a "merge" method on the MetricLabels protocol:Alternatives or Workarounds
Currently I'm trying to use a custom conformance to MetricsFactory
Which is not ideal because it will only work when I publish metrics via swift-metrics api. If need custom buckets/quantiles I'll have to set dimensions manually.
The text was updated successfully, but these errors were encountered: