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 interface
MetricsCaptor.CounterBuilder
A builder for a counter.static interface
MetricsCaptor.GaugeBuilder
A builder for a gauge.static interface
MetricsCaptor.TimerBuilder
A builder for a timer. -
Method Summary
Modifier and Type Method Description MetricsCaptor.CounterBuilder
counterBuilder(String name)
Create a counter builder for a counter with the provided name.MetricsCaptor.GaugeBuilder
gaugeBuilder(String name, Object obj, ToDoubleFunction<Object> f)
Create a gauge builder for a gauge with the provided parameters.default MeterFacade
removeMeter(MeterFacade facade)
Remove a meter facade.SampleFacade
start()
Start a sample collection.MetricsCaptor.TimerBuilder
timerBuilder(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
-