-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: optional id label for all metrics #154
Conversation
Hey @damiankaminski-form3 - a couple of questions:
|
That is the exact issue.
It depends on the scenario. It should be a value that:
|
Hmmm OK. Seems reasonable to me. I suppose the intention is to give the user more control over metrics deduplication when pushing metrics to PushGateway, which is an issue that everyone using this tool could have. I'm wondering if we couldn't make this more flexible by renaming the new env variable to PROMETHEUS_LABEL_ID. That way, we've be able to add more flexible behaviour in the future, such as adding all labels with Of course |
Good idea. Changed: ad760ba
We can add a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easy enough to do if that functionality is ever added, so I think it's OK not to add it right now.
Metrics are exported via prometheus push gateway. Unfortunately, push gateway is only a super simple cache. It does not add any common labels, such as server, or pod name, and when metric with the same label set is provided, it overrides the latest value with a new one. That's why it's crucial to make label values unique.
With the new
id
label it should be a little easier. It's optional and needed only when metric entries might be not unique.