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

Separate metrics server into a separate struct #238

Closed
samlaf opened this issue May 9, 2024 · 0 comments
Closed

Separate metrics server into a separate struct #238

samlaf opened this issue May 9, 2024 · 0 comments
Labels

Comments

@samlaf
Copy link
Collaborator

samlaf commented May 9, 2024

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

Right now the metrics interface and its implementation combine 2 separate concerns that should be separate:

  • one struct to keep the prometheus variables and helper functions to change them
  • actual metric server that listens on 9090

Problem comes when multiple services want to register their own metrics.
Each should have its own Metrics struct to keep track of its prom state and change them, but shouldn't also be a metrics server, because then its confusing where the separation of concern is.

Describe the solution you'd like

We should have a MetricsServer struct whose only purpose is to take in a registry (or many?) and that has a single StartServer() function to start its server.

Describe alternatives you've considered

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant