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
Modifier and TypeInterfaceDescriptionstatic interface
A builder for a counter.static interface
A builder for a gauge.static interface
A builder for a timer. -
Method Summary
Modifier and TypeMethodDescriptioncounterBuilder
(String name) Create a counter builder for a counter with the provided name.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.start()
Start a sample collection.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
-