public interface PrometheusMetricsWalker
Modifier and Type | Method and Description |
---|---|
default String |
buildLabelListString(Map<String,String> labels,
String prefix,
String suffix)
Convienence method that takes the given label list and returns a string in the form of
"labelName1=labelValue1,labelName2=labelValue2,..."
|
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.
|
void walkStart()
void walkFinish(int familiesProcessed, int metricsProcessed)
familiesProcessed
- total number of families processedmetricsProcessed
- total number of metrics across all families processedvoid walkMetricFamily(MetricFamily family, int index)
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.void walkCounterMetric(MetricFamily family, Counter counter, int index)
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.void walkGaugeMetric(MetricFamily family, Gauge gauge, int index)
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.void walkSummaryMetric(MetricFamily family, Summary summary, int index)
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.void walkHistogramMetric(MetricFamily family, Histogram histogram, int index)
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.default String buildLabelListString(Map<String,String> labels, String prefix, String suffix)
labels
- the label listprefix
- if not null, these characters will prefix the label listsuffix
- if not null, these characters will suffix the label listCopyright © 2021. All rights reserved.