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

fix(collector): Turn the variable registry in package webui into global variable #1860

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

limowang
Copy link
Collaborator

@limowang limowang commented Jan 18, 2024

Turn the variable registry in package webui into global variable.
Turn registry local variables into global variables to facilitate Collector reference registration later.

@@ -27,14 +27,15 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
)

var Registry = prometheus.NewRegistry()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the registry be created and returned by StartWebServer() to main(), thus registry would become a local variable ?

@acelyc111 acelyc111 changed the title fix(collector): Turn the variable registry in package webui into glob… fix(collector): Turn the variable registry in package webui into global variable Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants