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

Create default registry at runtime #518

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

cam-schultz
Copy link
Collaborator

Why this should be merged

We currently use prometheus.DefaultRegisterer as the registerer for metrics we don't intend to collect. DefaultRegisterer simply calls NewRegistry() at compile time. In situations that create NewSignatureAggregators within the same application instance (such as Ginkgo test suites), this can cause the aggregator to fail with AlreadyRegisteredError.

How this works

Replaces DefaultRegisterer with NewRegistry() so that the no-op registry is created at runtime rather than compile time.

How this was tested

CI

How is this documented

N/A

@cam-schultz cam-schultz merged commit b865549 into main Oct 10, 2024
8 checks passed
@cam-schultz cam-schultz deleted the dynamic-default-registry branch October 10, 2024 16:10
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.

3 participants