public final class BatchMetrics
extends java.lang.Object
Metrics.globalRegistry.
Provides common metrics such as Timer, Counter and Gauge.
Only intended for internal use.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
STATUS_FAILURE |
static java.lang.String |
STATUS_SUCCESS |
| Modifier and Type | Method and Description |
|---|---|
static io.micrometer.core.instrument.Counter |
createCounter(java.lang.String name,
java.lang.String description,
io.micrometer.core.instrument.Tag... tags)
Create a new
Counter. |
static io.micrometer.core.instrument.Gauge |
createGauge(java.lang.String name,
java.lang.String description,
java.util.function.Supplier<java.lang.Number> supplier,
io.micrometer.core.instrument.Tag... tags)
Create a new
Gauge. |
static io.micrometer.core.instrument.LongTaskTimer |
createLongTaskTimer(java.lang.String name,
java.lang.String description,
io.micrometer.core.instrument.Tag... tags)
Create a new
LongTaskTimer. |
static io.micrometer.core.instrument.Timer |
createTimer(java.lang.String name,
java.lang.String description,
io.micrometer.core.instrument.Tag... tags)
Create a
Timer. |
static io.micrometer.core.instrument.Timer.Sample |
createTimerSample()
Create a new
Timer.Sample. |
public static final java.lang.String STATUS_SUCCESS
public static final java.lang.String STATUS_FAILURE
public static io.micrometer.core.instrument.Timer createTimer(java.lang.String name,
java.lang.String description,
io.micrometer.core.instrument.Tag... tags)
Timer.name - of the timer. Will be prefixed with METRICS_PREFIX.description - of the timertags - of the timerpublic static io.micrometer.core.instrument.Timer.Sample createTimerSample()
Timer.Sample.public static io.micrometer.core.instrument.LongTaskTimer createLongTaskTimer(java.lang.String name,
java.lang.String description,
io.micrometer.core.instrument.Tag... tags)
LongTaskTimer.name - of the long task timer. Will be prefixed with METRICS_PREFIX.description - of the long task timer.tags - of the timerpublic static io.micrometer.core.instrument.Counter createCounter(java.lang.String name,
java.lang.String description,
io.micrometer.core.instrument.Tag... tags)
Counter.name - of the counter. Will be prefixed with METRICS_PREFIX.description - of the countertags - of the counterpublic static io.micrometer.core.instrument.Gauge createGauge(java.lang.String name,
java.lang.String description,
java.util.function.Supplier<java.lang.Number> supplier,
io.micrometer.core.instrument.Tag... tags)
Gauge.name - of the gauge. Will be prefixed with METRICS_PREFIX.description - of the gaugesupplier - A supplier that yields a value for the gauge.tags - of the gauge