Interface MetricsRegistry
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
MetricsTelemetry
- All Known Implementing Classes:
NoopMetricsRegistry
MetricsRegistry helps in creating the metric instruments.
- Opensearch.experimental:
-
Method Summary
Modifier and TypeMethodDescriptioncreateCounter(String name, String description, String unit) Creates the counter.createGauge(String name, String description, String unit, Supplier<Double> valueProvider, Tags tags) Creates the Observable Gauge type of Metric.createGauge(String name, String description, String unit, Supplier<TaggedMeasurement> value) Creates the Observable Gauge type of Metric.createHistogram(String name, String description, String unit) Creates the histogram type of Metric.createUpDownCounter(String name, String description, String unit) Creates the upDown counter.
-
Method Details
-
createCounter
-
createUpDownCounter
-
createHistogram
Creates the histogram type of Metric. Implementation framework will take care of the bucketing strategy.- Parameters:
name- name of the histogram.description- any description about the metric.unit- unit of the metric.- Returns:
- histogram.
-
createGauge
Closeable createGauge(String name, String description, String unit, Supplier<Double> valueProvider, Tags tags) Creates the Observable Gauge type of Metric. Where the value provider will be called at a certain frequency to capture the value.- Parameters:
name- name of the observable gauge.description- any description about the metric.unit- unit of the metric.valueProvider- value provider.tags- attributes/dimensions of the metric.- Returns:
- closeable to dispose/close the Gauge metric.
-
createGauge
Closeable createGauge(String name, String description, String unit, Supplier<TaggedMeasurement> value) Creates the Observable Gauge type of Metric. Where the value provider will be called at a certain frequency to capture the value.- Parameters:
name- name of the observable gauge.description- any description about the metric.unit- unit of the metric.value- value provider.- Returns:
- closeable to dispose/close the Gauge metric.
-