Class PrometheusMeterRegistries
java.lang.Object
com.linecorp.armeria.common.metric.PrometheusMeterRegistries
Provides the convenient factory methods for
PrometheusMeterRegistry
with more sensible defaults for
NamingConvention
.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends io.micrometer.prometheus.PrometheusMeterRegistry>
TconfigureRegistry
(T meterRegistry) Configures thePrometheusMeterRegistry
with Armeria's defaults.static io.micrometer.prometheus.PrometheusMeterRegistry
Returns the defaultPrometheusMeterRegistry
that usesCollectorRegistry.defaultRegistry
.static io.micrometer.prometheus.PrometheusMeterRegistry
Returns a newly-createdPrometheusMeterRegistry
instance with a newCollectorRegistry
.static io.micrometer.prometheus.PrometheusMeterRegistry
newRegistry
(io.prometheus.client.CollectorRegistry registry) Returns a newly-createdPrometheusMeterRegistry
instance with the specifiedCollectorRegistry
.static io.micrometer.prometheus.PrometheusMeterRegistry
newRegistry
(io.prometheus.client.CollectorRegistry registry, io.micrometer.core.instrument.Clock clock) Returns a newly-createdPrometheusMeterRegistry
instance with the specifiedCollectorRegistry
andClock
.
-
Method Details
-
defaultRegistry
public static io.micrometer.prometheus.PrometheusMeterRegistry defaultRegistry()Returns the defaultPrometheusMeterRegistry
that usesCollectorRegistry.defaultRegistry
. -
newRegistry
public static io.micrometer.prometheus.PrometheusMeterRegistry newRegistry()Returns a newly-createdPrometheusMeterRegistry
instance with a newCollectorRegistry
. -
newRegistry
public static io.micrometer.prometheus.PrometheusMeterRegistry newRegistry(io.prometheus.client.CollectorRegistry registry) Returns a newly-createdPrometheusMeterRegistry
instance with the specifiedCollectorRegistry
. -
newRegistry
public static io.micrometer.prometheus.PrometheusMeterRegistry newRegistry(io.prometheus.client.CollectorRegistry registry, io.micrometer.core.instrument.Clock clock) Returns a newly-createdPrometheusMeterRegistry
instance with the specifiedCollectorRegistry
andClock
. -
configureRegistry
public static <T extends io.micrometer.prometheus.PrometheusMeterRegistry> T configureRegistry(T meterRegistry) Configures thePrometheusMeterRegistry
with Armeria's defaults.- Returns:
- the specified
PrometheusMeterRegistry
-