Package org.apache.beam.sdk.metrics
Class LabeledMetricNameUtils.MetricNameBuilder
java.lang.Object
org.apache.beam.sdk.metrics.LabeledMetricNameUtils.MetricNameBuilder
- Enclosing class:
LabeledMetricNameUtils
Builder class for a labeled
MetricName
. Returned MetricName.getName()
will be
formatted as:
'{baseName}-{metricLabelKey1}:{metricLabelVal1};...{metricLabelKeyN}:{metricLabelValN};'
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a metric label KV pair to the metric name.void
addMetricLabel
(String key, String value) Add a metric label KV pair to the metric.baseNameBuilder
(String baseName)
-
Method Details
-
baseNameBuilder
-
addLabel
Add a metric label KV pair to the metric name. CallingaddLabel
multiple times with the samekey
will lead to unexpected results when parsing metric names. -
addMetricLabel
Add a metric label KV pair to the metric. This is not concatenated as a part of the name, but merely for adding attributes to the metric. -
build
-