@FunctionalInterface public interface AutoTimer
Timers
automatically instead of using
@Timed
.Modifier and Type | Field and Description |
---|---|
static AutoTimer |
DISABLED
An
AutoTimer implementation that is disabled and will not record metrics. |
static AutoTimer |
ENABLED
An
AutoTimer implementation that is enabled but applies no additional
customizations. |
Modifier and Type | Method and Description |
---|---|
void |
apply(io.micrometer.core.instrument.Timer.Builder builder)
Called to apply any auto-timer settings to the given
Timer.Builder . |
default io.micrometer.core.instrument.Timer.Builder |
builder(String name)
Factory method to create a new
Timer.Builder with auto-timer
settings applied . |
default io.micrometer.core.instrument.Timer.Builder |
builder(Supplier<io.micrometer.core.instrument.Timer.Builder> supplier)
Factory method to create a new
Timer.Builder with auto-timer
settings applied . |
default boolean |
isEnabled()
Return if the auto-timer is enabled and metrics should be recorded.
|
static final AutoTimer ENABLED
AutoTimer
implementation that is enabled but applies no additional
customizations.default boolean isEnabled()
default io.micrometer.core.instrument.Timer.Builder builder(String name)
Timer.Builder
with auto-timer
settings applied
.name
- the name of the timerdefault io.micrometer.core.instrument.Timer.Builder builder(Supplier<io.micrometer.core.instrument.Timer.Builder> supplier)
Timer.Builder
with auto-timer
settings applied
.supplier
- the builder suppliervoid apply(io.micrometer.core.instrument.Timer.Builder builder)
Timer.Builder
.builder
- the builder to apply settings toCopyright © 2019 Pivotal Software, Inc.. All rights reserved.