public class MicrometerMetricsCaptor extends Object implements MetricsCaptor
MetricsCaptor.| Modifier and Type | Class and Description |
|---|---|
protected static class |
MicrometerMetricsCaptor.AbstractMeter<M extends io.micrometer.core.instrument.Meter> |
protected static class |
MicrometerMetricsCaptor.MicroCounter |
protected static class |
MicrometerMetricsCaptor.MicroCounterBuilder |
protected static class |
MicrometerMetricsCaptor.MicroGauge |
protected static class |
MicrometerMetricsCaptor.MicroGaugeBuilder |
protected static class |
MicrometerMetricsCaptor.MicroTimer |
protected static class |
MicrometerMetricsCaptor.MicroTimerBuilder |
MetricsCaptor.CounterBuilder, MetricsCaptor.GaugeBuilder, MetricsCaptor.TimerBuilder| Modifier and Type | Field and Description |
|---|---|
protected io.micrometer.core.instrument.MeterRegistry |
meterRegistry |
static String |
MICROMETER_CAPTOR_NAME |
| Constructor and Description |
|---|
MicrometerMetricsCaptor(io.micrometer.core.instrument.MeterRegistry meterRegistry) |
| Modifier and Type | Method and Description |
|---|---|
MetricsCaptor.CounterBuilder |
counterBuilder(String name)
Create a counter builder for a counter with the provided name.
|
MetricsCaptor.GaugeBuilder |
gaugeBuilder(String name,
Object obj,
java.util.function.ToDoubleFunction<Object> f)
Create a gauge builder for a gauge with the provided parameters.
|
static MetricsCaptor |
loadCaptor(ApplicationContext applicationContext)
Add a MicrometerMetricsCaptor to the context if there's a MeterRegistry; if
there's already a
MetricsCaptor bean, return that. |
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.
|
public static final String MICROMETER_CAPTOR_NAME
protected final io.micrometer.core.instrument.MeterRegistry meterRegistry
public MicrometerMetricsCaptor(io.micrometer.core.instrument.MeterRegistry meterRegistry)
public MetricsCaptor.TimerBuilder timerBuilder(String name)
MetricsCaptortimerBuilder in interface MetricsCaptorname - the name.public MetricsCaptor.CounterBuilder counterBuilder(String name)
MetricsCaptorcounterBuilder in interface MetricsCaptorname - the name.public MetricsCaptor.GaugeBuilder gaugeBuilder(String name, Object obj, java.util.function.ToDoubleFunction<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 MeterFacade removeMeter(MeterFacade facade)
MetricsCaptorremoveMeter in interface MetricsCaptorfacade - the facade to remove.public static MetricsCaptor loadCaptor(ApplicationContext applicationContext)
MetricsCaptor bean, return that.applicationContext - the application context.