Package org.elasticsearch.telemetry
Class RecordingMeterRegistry
java.lang.Object
org.elasticsearch.telemetry.RecordingMeterRegistry
- All Implemented Interfaces:
MeterRegistry
A
MeterRegistry that records all instrument invocations.
Tests can subclass this class and extend the build[Instrument] methods to do their
own validations at instrument registration time and/or provide their own instruments.-
Field Summary
FieldsFields inherited from interface org.elasticsearch.telemetry.metric.MeterRegistry
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DoubleCounterbuildDoubleCounter(String name, String description, String unit) protected DoubleGaugebuildDoubleGauge(String name, String description, String unit, Supplier<Collection<DoubleWithAttributes>> observer) protected DoubleHistogrambuildDoubleHistogram(String name, String description, String unit) protected DoubleUpDownCounterbuildDoubleUpDownCounter(String name, String description, String unit) protected LongCounterbuildLongCounter(String name, String description, String unit) protected LongGaugebuildLongGauge(String name, String description, String unit, Supplier<Collection<LongWithAttributes>> observer) protected LongHistogrambuildLongHistogram(String name, String description, String unit) protected LongUpDownCounterbuildLongUpDownCounter(String name, String description, String unit) getDoubleAsyncCounter(String name) getDoubleCounter(String name) getDoubleGauge(String name) getDoubleHistogram(String name) getDoubleUpDownCounter(String name) getLongAsyncCounter(String name) getLongCounter(String name) getLongGauge(String name) getLongHistogram(String name) getLongUpDownCounter(String name) registerDoubleAsyncCounter(String name, String description, String unit, Supplier<DoubleWithAttributes> observer) registerDoubleCounter(String name, String description, String unit) registerDoubleGauge(String name, String description, String unit, Supplier<DoubleWithAttributes> observer) registerDoubleHistogram(String name, String description, String unit) registerDoublesAsyncCounter(String name, String description, String unit, Supplier<Collection<DoubleWithAttributes>> observer) registerDoublesGauge(String name, String description, String unit, Supplier<Collection<DoubleWithAttributes>> observer) registerDoubleUpDownCounter(String name, String description, String unit) registerLongAsyncCounter(String name, String description, String unit, Supplier<LongWithAttributes> observer) registerLongCounter(String name, String description, String unit) registerLongGauge(String name, String description, String unit, Supplier<LongWithAttributes> observer) registerLongHistogram(String name, String description, String unit) registerLongsAsyncCounter(String name, String description, String unit, Supplier<Collection<LongWithAttributes>> observer) registerLongsGauge(String name, String description, String unit, Supplier<Collection<LongWithAttributes>> observer) registerLongUpDownCounter(String name, String description, String unit)
-
Field Details
-
recorder
-
-
Constructor Details
-
RecordingMeterRegistry
public RecordingMeterRegistry()
-
-
Method Details
-
getRecorder
-
registerDoubleCounter
- Specified by:
registerDoubleCounterin interfaceMeterRegistry
-
getDoubleCounter
- Specified by:
getDoubleCounterin interfaceMeterRegistry
-
buildDoubleCounter
-
registerDoubleUpDownCounter
public DoubleUpDownCounter registerDoubleUpDownCounter(String name, String description, String unit) - Specified by:
registerDoubleUpDownCounterin interfaceMeterRegistry
-
getDoubleUpDownCounter
- Specified by:
getDoubleUpDownCounterin interfaceMeterRegistry
-
buildDoubleUpDownCounter
protected DoubleUpDownCounter buildDoubleUpDownCounter(String name, String description, String unit) -
registerDoubleGauge
public DoubleGauge registerDoubleGauge(String name, String description, String unit, Supplier<DoubleWithAttributes> observer) - Specified by:
registerDoubleGaugein interfaceMeterRegistry
-
registerDoublesGauge
public DoubleGauge registerDoublesGauge(String name, String description, String unit, Supplier<Collection<DoubleWithAttributes>> observer) - Specified by:
registerDoublesGaugein interfaceMeterRegistry
-
getDoubleGauge
- Specified by:
getDoubleGaugein interfaceMeterRegistry
-
buildDoubleGauge
protected DoubleGauge buildDoubleGauge(String name, String description, String unit, Supplier<Collection<DoubleWithAttributes>> observer) -
registerDoubleHistogram
- Specified by:
registerDoubleHistogramin interfaceMeterRegistry
-
getDoubleHistogram
- Specified by:
getDoubleHistogramin interfaceMeterRegistry
-
buildDoubleHistogram
-
registerLongCounter
- Specified by:
registerLongCounterin interfaceMeterRegistry
-
registerLongAsyncCounter
public LongAsyncCounter registerLongAsyncCounter(String name, String description, String unit, Supplier<LongWithAttributes> observer) - Specified by:
registerLongAsyncCounterin interfaceMeterRegistry
-
registerLongsAsyncCounter
public LongAsyncCounter registerLongsAsyncCounter(String name, String description, String unit, Supplier<Collection<LongWithAttributes>> observer) - Specified by:
registerLongsAsyncCounterin interfaceMeterRegistry
-
getLongAsyncCounter
- Specified by:
getLongAsyncCounterin interfaceMeterRegistry
-
registerDoubleAsyncCounter
public DoubleAsyncCounter registerDoubleAsyncCounter(String name, String description, String unit, Supplier<DoubleWithAttributes> observer) - Specified by:
registerDoubleAsyncCounterin interfaceMeterRegistry
-
registerDoublesAsyncCounter
public DoubleAsyncCounter registerDoublesAsyncCounter(String name, String description, String unit, Supplier<Collection<DoubleWithAttributes>> observer) - Specified by:
registerDoublesAsyncCounterin interfaceMeterRegistry
-
getDoubleAsyncCounter
- Specified by:
getDoubleAsyncCounterin interfaceMeterRegistry
-
getLongCounter
- Specified by:
getLongCounterin interfaceMeterRegistry
-
buildLongCounter
-
registerLongUpDownCounter
- Specified by:
registerLongUpDownCounterin interfaceMeterRegistry
-
getLongUpDownCounter
- Specified by:
getLongUpDownCounterin interfaceMeterRegistry
-
buildLongUpDownCounter
-
registerLongGauge
public LongGauge registerLongGauge(String name, String description, String unit, Supplier<LongWithAttributes> observer) - Specified by:
registerLongGaugein interfaceMeterRegistry
-
registerLongsGauge
public LongGauge registerLongsGauge(String name, String description, String unit, Supplier<Collection<LongWithAttributes>> observer) - Specified by:
registerLongsGaugein interfaceMeterRegistry
-
getLongGauge
- Specified by:
getLongGaugein interfaceMeterRegistry
-
buildLongGauge
protected LongGauge buildLongGauge(String name, String description, String unit, Supplier<Collection<LongWithAttributes>> observer) -
registerLongHistogram
- Specified by:
registerLongHistogramin interfaceMeterRegistry
-
getLongHistogram
- Specified by:
getLongHistogramin interfaceMeterRegistry
-
buildLongHistogram
-