public static class LabeledMetricNameUtils.MetricNameBuilder
extends java.lang.Object
MetricName
. Returned MetricName.getName()
will be
formatted as:
'{baseName}-{metricLabelKey1}:{metricLabelVal1};...{metricLabelKeyN}:{metricLabelValN};'
Modifier and Type | Method and Description |
---|---|
void |
addLabel(java.lang.String key,
java.lang.String value)
Add a metric label KV pair to the metric name.
|
static LabeledMetricNameUtils.MetricNameBuilder |
baseNameBuilder(java.lang.String baseName) |
MetricName |
build(java.lang.String metricNamespace) |
public static LabeledMetricNameUtils.MetricNameBuilder baseNameBuilder(java.lang.String baseName)
public void addLabel(java.lang.String key, java.lang.String value)
addLabel
multiple times with
the same key
will lead to unexpected results when parsing metric names.public MetricName build(java.lang.String metricNamespace)