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

The proper way to re initialize metrics #1428

Open
robsztal opened this issue Jan 9, 2024 · 0 comments
Open

The proper way to re initialize metrics #1428

robsztal opened this issue Jan 9, 2024 · 0 comments

Comments

@robsztal
Copy link

robsztal commented Jan 9, 2024

Hey,

I want to reinitialize registered metrics while server is running. What is the proper way? As I understand current logic has to be refactored:

some_metric := prometheus.NewGauge()
prometheus.MustRegister(some_metric)

I saw that I have to refactor it so I have a specific registerer created? And then I just remove it and register a new one ?

Currently I am providing a json file with metrics definitions and it is processed so the metrics are created and registered. Now if I will make a change I want to rerun that process but I saw some issues that you cannot register the same unregistered metric.

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

1 participant