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

Pass custom Prometheus registerer to promtail #3174

Closed
rfratto opened this issue Jan 14, 2021 · 0 comments · Fixed by #3175
Closed

Pass custom Prometheus registerer to promtail #3174

rfratto opened this issue Jan 14, 2021 · 0 comments · Fixed by #3175

Comments

@rfratto
Copy link
Member

rfratto commented Jan 14, 2021

Currently, all of the metrics in Promtail are registered to the global Prometheus registerer. This causes a problem in the Grafana Cloud Agent:

  1. Promtail metrics are already registered, even if you're not using the embedded Promtail
  2. You can only have one set of metrics globally, i.e., if you wanted multiple embedded Promtails, they would share a global set of metrics.

I would like to pass around a registry and register metrics at the time of instantiation rather than having them be globals.

This is a change I will implement myself in a few days, but wanted to open an issue first in case this would be contentious.

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

Successfully merging a pull request may close this issue.

1 participant