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

Provide RegisterMetrics() functions in packages that expose metrics #3698

Open
roman-khimov opened this issue Nov 22, 2024 · 0 comments
Open
Labels
enhancement Improving existing functionality I3 Minimal impact S3 Minimally significant U4 Nothing urgent

Comments

@roman-khimov
Copy link
Member

Is your feature request related to a problem? Please describe.

I'm always frustrated when I realize that we always register our metrics in init() in every package that exposes them. On one hand it's convenient, but on the other some package users may want to opt out from our metrics.

Describe the solution you'd like

Keep metrics package-level, but expose some RegisterMetrics() function (accepting a registry?) that will do metric registration. Call it in cli/server and everywhere else needed. Keep in mind that variables still need to be initialized properly in every package.

Describe alternatives you've considered

Keep things as is, works too.

Additional context

nspcc-dev/neofs-node#3016
#3682

@roman-khimov roman-khimov added I3 Minimal impact U4 Nothing urgent enhancement Improving existing functionality S3 Minimally significant labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I3 Minimal impact S3 Minimally significant U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

1 participant