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

Use own registry for the stats handler #1837

Closed
wants to merge 1 commit into from
Closed

Conversation

lyuboxa
Copy link
Contributor

@lyuboxa lyuboxa commented Sep 9, 2024

Description

Use own registry for the stats handler to create separation between the global/default prom client registry.
Conduit metrics are already using a separate registry.

When testing Conduit embedded, ..MustRegister() may fail due to the stats handler already registered in the global registry.

Screenshot 2024-09-09 at 13 28 07

Quick checks

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@lyuboxa lyuboxa requested a review from a team as a code owner September 9, 2024 17:28
Comment on lines +254 to +255
promclient.MustRegister(reg)
reg.MustRegister(h)
Copy link
Member

Choose a reason for hiding this comment

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

This only masks the issue, turning these two lines around produces the same panic.

I'm thinking we could continue using the default registry and only register metrics if they are not yet registered.

@lyuboxa
Copy link
Contributor Author

lyuboxa commented Sep 10, 2024

Closing, superseded by #1842

@lyuboxa lyuboxa closed this Sep 10, 2024
@raulb raulb deleted the lk/reg-for-stats-handler branch November 8, 2024 09:57
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 this pull request may close these issues.

2 participants