Class PrometheusMetricsService
java.lang.Object
eu.rarogsoftware.rarog.platform.core.metrics.prometheus.PrometheusMetricsService
- All Implemented Interfaces:
MetricsService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseMetric(BasicMetric metric) Close instance of metric.createCounter(MetricSettings settings) createGauge(MetricSettings settings) createHistogram(HistogramSettings settings) createInfo(MetricSettings settings) voidsample()Get last known state of all metrics in system.snapshot()Gets snapshot state of metrics active in current moment.
-
Constructor Details
-
PrometheusMetricsService
-
PrometheusMetricsService
public PrometheusMetricsService()
-
-
Method Details
-
createCounter
- Specified by:
createCounterin interfaceMetricsService- Parameters:
settings- metric settings- Returns:
- new instance of
Countermetric
-
createGauge
- Specified by:
createGaugein interfaceMetricsService- Parameters:
settings- metric settings- Returns:
- new instance of
Gaugemetric
-
createHistogram
- Specified by:
createHistogramin interfaceMetricsService- Parameters:
settings- metric settings- Returns:
- new instance of
Histogrammetric
-
createInfo
- Specified by:
createInfoin interfaceMetricsService- Parameters:
settings- metric settings- Returns:
- new instance of
Infometric
-
closeMetric
Description copied from interface:MetricsServiceClose instance of metric.Closed metric are no longer exported as part of snapshot. They will still be part of exposed metrics, but they are not stored in snapshot nor exported to external systems. Closed metric will be included in the nearest snapshot.
- Specified by:
closeMetricin interfaceMetricsService- Parameters:
metric- metric to close. Must be metric created by the same instance ofMetricsService
-
snapshot
Description copied from interface:MetricsServiceGets snapshot state of metrics active in current moment.- Specified by:
snapshotin interfaceMetricsService- Returns:
- snapshot of metrics state in current moment
-
sample
Description copied from interface:MetricsServiceGet last known state of all metrics in system.- Specified by:
samplein interfaceMetricsService- Returns:
- collection of last known samples of all metrics in system
-
resetMetrics
public void resetMetrics()
-