public class MicrometerMetricsCaptor extends java.lang.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 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; 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(java.lang.String name)
Create a timer builder for a timer with the provided name.
|
public static final java.lang.String MICROMETER_CAPTOR_NAME
protected final io.micrometer.core.instrument.MeterRegistry meterRegistry
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 MeterFacade removeMeter(MeterFacade facade)
MetricsCaptorremoveMeter in interface MetricsCaptorfacade - the facade to remove.public static MetricsCaptor loadCaptor(org.springframework.context.ApplicationContext applicationContext)
MetricsCaptor bean, return that.applicationContext - the application context.