Package io.opentelemetry.micrometer1shim
Class OpenTelemetryMeterRegistryBuilder
java.lang.Object
io.opentelemetry.micrometer1shim.OpenTelemetryMeterRegistryBuilder
A builder of
OpenTelemetryMeterRegistry.-
Method Summary
Modifier and TypeMethodDescriptionio.micrometer.core.instrument.MeterRegistrybuild()Returns a newOpenTelemetryMeterRegistrywith the settings of thisOpenTelemetryMeterRegistryBuilder.setBaseTimeUnit(TimeUnit baseTimeUnit) Sets the base time unit.setClock(io.micrometer.core.instrument.Clock clock) Sets a customClock.setPrometheusMode(boolean prometheusMode) Enables the "Prometheus mode" - this will simulate the behavior of Micrometer'sPrometheusMeterRegistry.
-
Method Details
-
setClock
Sets a customClock. Useful for testing. -
setBaseTimeUnit
Sets the base time unit. -
setPrometheusMode
Enables the "Prometheus mode" - this will simulate the behavior of Micrometer'sPrometheusMeterRegistry. The instruments will be renamed to match Micrometer instrument naming, and the base time unit will be set to seconds.Set this to
trueif you are using the Prometheus metrics exporter. -
build
public io.micrometer.core.instrument.MeterRegistry build()Returns a newOpenTelemetryMeterRegistrywith the settings of thisOpenTelemetryMeterRegistryBuilder.
-