Metric registry lifecycle

Lifecycle of metric registries is controlled by the io.smallrye.metrics.MetricRegistries application-scoped bean. If it is necessary to drop and recreate a metric registry during runtime, it is possible to call MetricRegistries.drop(MetricRegistry.Type) to drop one particular registry, or MetricRegistries.dropAll(). After a metric registry is dropped, a new empty registry will be automatically initialized when a reference to the particular registry type is being requested.

The io.smallrye.metrics.MetricRegistries class is also meant to be public API, so applications are allowed to use its static method get to obtain references to metric registries without having to inject them using CDI.