ava-labs / awm-relayer

Service for relaying Avalanche Warp Messages between Subnets
Other
24 stars 19 forks source link

Create default registry at runtime #518

Closed cam-schultz closed 1 month ago

cam-schultz commented 1 month ago

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