Package io.helidon.microprofile.metrics
Class RegistryFactory
java.lang.Object
io.helidon.microprofile.metrics.RegistryFactory
Micrometer-specific implementation of a registry factory, created automatically whenever a new
MeterRegistry
is created by a metrics provider.
Note: Formerly, an instance of this class could be updated with new configuration information after it had been initialized as described in Github issue #360. This version, though, is instantiated once per new meter registry, with the intent that only one meter registry will every be created in a production server.
The getInstance(io.helidon.metrics.api.MeterRegistry)
method creates a new instance and saves it for retrieval via getInstance()
. The
create(io.helidon.metrics.api.MeterRegistry)
method creates a new instance but does not record it internally.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RegistryFactory
Get a singleton instance of the registry factory.getRegistry
(String scope) Get a registry based on its scope.scopes()
Report the scopes of all existing registries.
-
Method Details
-
getInstance
Get a singleton instance of the registry factory.- Returns:
- registry factory singleton
-
getRegistry
Get a registry based on its scope.- Parameters:
scope
- scope of registry- Returns:
- Registry for the scope requested
-
scopes
Report the scopes of all existing registries.- Returns:
- set of scope names
-