public final class BackendRegistries extends Object
BackendRegistries
is responsible for managing registries related to particular micrometer backends (influxdb, prometheus...)
It contains a store of BackendRegistry
objects, each of whose encapsulating a micrometer's MeterRegistry
Modifier and Type | Method and Description |
---|---|
static io.micrometer.core.instrument.MeterRegistry |
getDefaultNow()
Get the default micrometer registry.
|
static io.micrometer.core.instrument.MeterRegistry |
getNow(String registryName)
Get the micrometer registry of the given name.
|
static void |
registerMatchers(io.micrometer.core.instrument.MeterRegistry registry,
Set<Label> enabledLabels,
List<Match> matches) |
static BackendRegistry |
setupBackend(MicrometerMetricsOptions options)
Create a new backend registry, containing a micrometer registry, initialized with the provided options.
|
static void |
stop(String registryName)
Stop (unregister) the backend registry of the given name.
|
public static BackendRegistry setupBackend(MicrometerMetricsOptions options)
options
- micrometer options, including configuration related to the backend.
Should be a subclass of MicrometerMetricsOptions
(ex: VertxInfluxDbOptions
, VertxPrometheusOptions
).
If the class is not recognized, a NoopBackendRegistry
will be returned.BackendRegistry
public static io.micrometer.core.instrument.MeterRegistry getDefaultNow()
null
if it hasn't been registered yet or if it has been stopped.null
public static io.micrometer.core.instrument.MeterRegistry getNow(String registryName)
null
if it hasn't been registered yet or if it has been stopped.registryName
- the name associated with this registry in Micrometer optionsnull
public static void stop(String registryName)
registryName
- the name associated with this registry in Micrometer optionsCopyright © 2021 Eclipse. All rights reserved.