Interface MetricsCaptor
- All Known Implementing Classes:
MicrometerMetricsCaptor
public interface MetricsCaptor
A metrics facade that delegates to a concrete implementation.
- Since:
- 5.0.4
- Author:
- Gary Russell
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMetricsCaptor.CounterBuilderA builder for a counter.static interfaceMetricsCaptor.GaugeBuilderA builder for a gauge.static interfaceMetricsCaptor.TimerBuilderA builder for a timer. -
Method Summary
Modifier and Type Method Description MetricsCaptor.CounterBuildercounterBuilder(String name)Create a counter builder for a counter with the provided name.MetricsCaptor.GaugeBuildergaugeBuilder(String name, Object obj, ToDoubleFunction<Object> f)Create a gauge builder for a gauge with the provided parameters.default MeterFacaderemoveMeter(MeterFacade facade)Remove a meter facade.SampleFacadestart()Start a sample collection.MetricsCaptor.TimerBuildertimerBuilder(String name)Create a timer builder for a timer with the provided name.
-
Method Details
-
timerBuilder
Create a timer builder for a timer with the provided name.- Parameters:
name- the name.- Returns:
- the builder.
-
counterBuilder
Create a counter builder for a counter with the provided name.- Parameters:
name- the name.- Returns:
- the builder.
-
gaugeBuilder
MetricsCaptor.GaugeBuilder gaugeBuilder(String name, @Nullable Object obj, ToDoubleFunction<Object> f)Create a gauge builder for a gauge with the provided parameters.- Parameters:
name- the name.obj- the object with which to invoke the function.f- the function.- Returns:
- the builder.
-
start
SampleFacade start()Start a sample collection.- Returns:
- the sample.
-
removeMeter
Remove a meter facade.- Parameters:
facade- the facade to remove.- Returns:
- the removed facade, or null.
- Since:
- 5.1
-