Class MetricCollectingWalker
- java.lang.Object
-
- org.hawkular.agent.prometheus.walkers.MetricCollectingWalker
-
- All Implemented Interfaces:
PrometheusMetricsWalker
public class MetricCollectingWalker extends Object implements PrometheusMetricsWalker
Gathers the complete list of metrics, ignoring the metric families.
-
-
Constructor Summary
Constructors Constructor Description MetricCollectingWalker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hawkular.agent.prometheus.walkers.PrometheusMetricsWalker
buildLabelListString
-
-
-
-
Method Detail
-
walkStart
public void walkStart()
Description copied from interface:PrometheusMetricsWalker
Called when a walk has been started.- Specified by:
walkStart
in interfacePrometheusMetricsWalker
-
walkFinish
public void walkFinish(int familiesProcessed, int metricsProcessed)
Description copied from interface:PrometheusMetricsWalker
Called when a walk has traversed all the metrics.- Specified by:
walkFinish
in interfacePrometheusMetricsWalker
- Parameters:
familiesProcessed
- total number of families processedmetricsProcessed
- total number of metrics across all families processed
-
walkMetricFamily
public void walkMetricFamily(MetricFamily family, int index)
Description copied from interface:PrometheusMetricsWalker
Called when a new metric family is about to be traversed.- Specified by:
walkMetricFamily
in interfacePrometheusMetricsWalker
- Parameters:
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.
-
walkCounterMetric
public void walkCounterMetric(MetricFamily family, Counter counter, int index)
Description copied from interface:PrometheusMetricsWalker
Called when a new counter metric is found.- Specified by:
walkCounterMetric
in interfacePrometheusMetricsWalker
- Parameters:
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.
-
walkGaugeMetric
public void walkGaugeMetric(MetricFamily family, Gauge gauge, int index)
Description copied from interface:PrometheusMetricsWalker
Called when a new gauge metric is found.- Specified by:
walkGaugeMetric
in interfacePrometheusMetricsWalker
- Parameters:
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.
-
walkSummaryMetric
public void walkSummaryMetric(MetricFamily family, Summary summary, int index)
Description copied from interface:PrometheusMetricsWalker
Called when a new summary metric is found.- Specified by:
walkSummaryMetric
in interfacePrometheusMetricsWalker
- Parameters:
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.
-
walkHistogramMetric
public void walkHistogramMetric(MetricFamily family, Histogram histogram, int index)
Description copied from interface:PrometheusMetricsWalker
Called when a new histogram metric is found.- Specified by:
walkHistogramMetric
in interfacePrometheusMetricsWalker
- Parameters:
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.
-
-