Package io.micrometer.core.instrument
Interface FunctionCounter
- All Superinterfaces:
Meter
- All Known Implementing Classes:
CompositeFunctionCounter,CumulativeFunctionCounter,DropwizardFunctionCounter,NoopFunctionCounter,StepFunctionCounter
public interface FunctionCounter extends Meter
A counter that tracks a monotonically increasing function.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classFunctionCounter.Builder<T>Fluent builder for function counters.Nested classes/interfaces inherited from interface io.micrometer.core.instrument.Meter
Meter.Id, Meter.Type -
Method Summary
Modifier and Type Method Description static <T> FunctionCounter.Builder<T>builder(java.lang.String name, T obj, java.util.function.ToDoubleFunction<T> f)doublecount()default java.lang.Iterable<Measurement>measure()Get a set of measurements.
-
Method Details
-
builder
static <T> FunctionCounter.Builder<T> builder(java.lang.String name, @Nullable T obj, java.util.function.ToDoubleFunction<T> f) -
count
double count()- Returns:
- The cumulative count since this counter was created.
-
measure
Description copied from interface:MeterGet a set of measurements. Should always return the same number of measurements and in the same order, regardless of the level of activity or the lack thereof.
-