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 DoubleCounter
buildDoubleCounter
(String name, String description, String unit) protected DoubleGauge
buildDoubleGauge
(String name, String description, String unit, Supplier<DoubleWithAttributes> observer) protected DoubleHistogram
buildDoubleHistogram
(String name, String description, String unit) protected DoubleUpDownCounter
buildDoubleUpDownCounter
(String name, String description, String unit) protected LongCounter
buildLongCounter
(String name, String description, String unit) protected LongGauge
buildLongGauge
(String name, String description, String unit, Supplier<LongWithAttributes> observer) protected LongHistogram
buildLongHistogram
(String name, String description, String unit) protected LongUpDownCounter
buildLongUpDownCounter
(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) 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) registerLongUpDownCounter
(String name, String description, String unit)
-
Field Details
-
recorder
-
-
Constructor Details
-
RecordingMeterRegistry
public RecordingMeterRegistry()
-
-
Method Details
-
registerDoubleCounter
- Specified by:
registerDoubleCounter
in interfaceMeterRegistry
-
getDoubleCounter
- Specified by:
getDoubleCounter
in interfaceMeterRegistry
-
buildDoubleCounter
-
registerDoubleUpDownCounter
public DoubleUpDownCounter registerDoubleUpDownCounter(String name, String description, String unit) - Specified by:
registerDoubleUpDownCounter
in interfaceMeterRegistry
-
getDoubleUpDownCounter
- Specified by:
getDoubleUpDownCounter
in 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:
registerDoubleGauge
in interfaceMeterRegistry
-
getDoubleGauge
- Specified by:
getDoubleGauge
in interfaceMeterRegistry
-
buildDoubleGauge
protected DoubleGauge buildDoubleGauge(String name, String description, String unit, Supplier<DoubleWithAttributes> observer) -
registerDoubleHistogram
- Specified by:
registerDoubleHistogram
in interfaceMeterRegistry
-
getDoubleHistogram
- Specified by:
getDoubleHistogram
in interfaceMeterRegistry
-
buildDoubleHistogram
-
registerLongCounter
- Specified by:
registerLongCounter
in interfaceMeterRegistry
-
registerLongAsyncCounter
public LongAsyncCounter registerLongAsyncCounter(String name, String description, String unit, Supplier<LongWithAttributes> observer) - Specified by:
registerLongAsyncCounter
in interfaceMeterRegistry
-
getLongAsyncCounter
- Specified by:
getLongAsyncCounter
in interfaceMeterRegistry
-
registerDoubleAsyncCounter
public DoubleAsyncCounter registerDoubleAsyncCounter(String name, String description, String unit, Supplier<DoubleWithAttributes> observer) - Specified by:
registerDoubleAsyncCounter
in interfaceMeterRegistry
-
getDoubleAsyncCounter
- Specified by:
getDoubleAsyncCounter
in interfaceMeterRegistry
-
getLongCounter
- Specified by:
getLongCounter
in interfaceMeterRegistry
-
buildLongCounter
-
registerLongUpDownCounter
- Specified by:
registerLongUpDownCounter
in interfaceMeterRegistry
-
getLongUpDownCounter
- Specified by:
getLongUpDownCounter
in interfaceMeterRegistry
-
buildLongUpDownCounter
-
registerLongGauge
public LongGauge registerLongGauge(String name, String description, String unit, Supplier<LongWithAttributes> observer) - Specified by:
registerLongGauge
in interfaceMeterRegistry
-
getLongGauge
- Specified by:
getLongGauge
in interfaceMeterRegistry
-
buildLongGauge
-
registerLongHistogram
- Specified by:
registerLongHistogram
in interfaceMeterRegistry
-
getLongHistogram
- Specified by:
getLongHistogram
in interfaceMeterRegistry
-
buildLongHistogram
-