public class MetricCollectingWalker extends Object implements PrometheusMetricsWalker
Constructor and Description |
---|
MetricCollectingWalker() |
Modifier and Type | Method and Description |
---|---|
List<Metric> |
getMetrics() |
void |
walkCounterMetric(MetricFamily family,
Counter counter,
int index)
Called when a new counter metric is found.
|
void |
walkFinish(int familiesProcessed,
int metricsProcessed)
Called when a walk has traversed all the metrics.
|
void |
walkGaugeMetric(MetricFamily family,
Gauge gauge,
int index)
Called when a new gauge metric is found.
|
void |
walkHistogramMetric(MetricFamily family,
Histogram histogram,
int index)
Called when a new histogram metric is found.
|
void |
walkMetricFamily(MetricFamily family,
int index)
Called when a new metric family is about to be traversed.
|
void |
walkStart()
Called when a walk has been started.
|
void |
walkSummaryMetric(MetricFamily family,
Summary summary,
int index)
Called when a new summary metric is found.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildLabelListString
public void walkStart()
PrometheusMetricsWalker
walkStart
in interface PrometheusMetricsWalker
public void walkFinish(int familiesProcessed, int metricsProcessed)
PrometheusMetricsWalker
walkFinish
in interface PrometheusMetricsWalker
familiesProcessed
- total number of families processedmetricsProcessed
- total number of metrics across all families processedpublic void walkMetricFamily(MetricFamily family, int index)
PrometheusMetricsWalker
walkMetricFamily
in interface PrometheusMetricsWalker
family
- information about the family being traversed such as the name, help description, etc.index
- index of the family being processed, where 0 is the first one.public void walkCounterMetric(MetricFamily family, Counter counter, int index)
PrometheusMetricsWalker
walkCounterMetric
in interface PrometheusMetricsWalker
family
- information about the family being traversed such as the name, help description, etc.counter
- the metric being processedindex
- index of the metric being processed, where 0 is the first one.public void walkGaugeMetric(MetricFamily family, Gauge gauge, int index)
PrometheusMetricsWalker
walkGaugeMetric
in interface PrometheusMetricsWalker
family
- information about the family being traversed such as the name, help description, etc.gauge
- the metric being processedindex
- index of the metric being processed, where 0 is the first one.public void walkSummaryMetric(MetricFamily family, Summary summary, int index)
PrometheusMetricsWalker
walkSummaryMetric
in interface PrometheusMetricsWalker
family
- information about the family being traversed such as the name, help description, etc.summary
- the metric being processedindex
- index of the metric being processed, where 0 is the first one.public void walkHistogramMetric(MetricFamily family, Histogram histogram, int index)
PrometheusMetricsWalker
walkHistogramMetric
in interface PrometheusMetricsWalker
family
- information about the family being traversed such as the name, help description, etc.histogram
- the metric being processedindex
- index of the metric being processed, where 0 is the first one.Copyright © 2021. All rights reserved.