public class MicrometerMetricsCaptor extends java.lang.Object implements MetricsCaptor
MetricsCaptor.MetricsCaptor.CounterBuilder, MetricsCaptor.GaugeBuilder, MetricsCaptor.TimerBuilder| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MICROMETER_CAPTOR_NAME |
| Constructor and Description |
|---|
MicrometerMetricsCaptor(io.micrometer.core.instrument.MeterRegistry meterRegistry) |
| Modifier and Type | Method and Description |
|---|---|
MetricsCaptor.CounterBuilder |
counterBuilder(java.lang.String name)
Create a counter builder for a counter with the provided name.
|
MetricsCaptor.GaugeBuilder |
gaugeBuilder(java.lang.String name,
java.lang.Object obj,
java.util.function.ToDoubleFunction<java.lang.Object> f)
Create a gauge builder for a gauge with the provided parameters.
|
static MetricsCaptor |
loadCaptor(org.springframework.context.ApplicationContext applicationContext)
Add a MicrometerMetricsCaptor to the context if there's a MeterRegistry.
|
SampleFacade |
start()
Start a sample collection.
|
MetricsCaptor.TimerBuilder |
timerBuilder(java.lang.String name)
Create a timer builder for a timer with the provided name.
|
public static final java.lang.String MICROMETER_CAPTOR_NAME
public MicrometerMetricsCaptor(io.micrometer.core.instrument.MeterRegistry meterRegistry)
public MetricsCaptor.TimerBuilder timerBuilder(java.lang.String name)
MetricsCaptortimerBuilder in interface MetricsCaptorname - the name.public MetricsCaptor.CounterBuilder counterBuilder(java.lang.String name)
MetricsCaptorcounterBuilder in interface MetricsCaptorname - the name.public MetricsCaptor.GaugeBuilder gaugeBuilder(java.lang.String name, java.lang.Object obj, java.util.function.ToDoubleFunction<java.lang.Object> f)
MetricsCaptorgaugeBuilder in interface MetricsCaptorname - the name.obj - the object with which to invoke the function.f - the function.public SampleFacade start()
MetricsCaptorstart in interface MetricsCaptorpublic static MetricsCaptor loadCaptor(org.springframework.context.ApplicationContext applicationContext)
applicationContext - the application context.