public abstract static class MetricOptions.Builder extends Object
MetricOptions.| Modifier and Type | Method and Description |
|---|---|
MetricOptions |
build()
Builds and returns a
MetricOptions with the desired options. |
abstract MetricOptions.Builder |
setConstantLabels(Map<LabelKey,LabelValue> constantLabels)
Sets the map of constant labels (they will be added to all the TimeSeries) for the Metric.
|
abstract MetricOptions.Builder |
setDescription(String description)
Sets the description of the Metric.
|
abstract MetricOptions.Builder |
setLabelKeys(List<LabelKey> labelKeys)
Sets the list of label keys for the Metric.
|
abstract MetricOptions.Builder |
setUnit(String unit)
Sets the unit of the Metric.
|
public abstract MetricOptions.Builder setDescription(String description)
description - the description of the Metric.public abstract MetricOptions.Builder setUnit(String unit)
unit - the unit of the Metric.public abstract MetricOptions.Builder setLabelKeys(List<LabelKey> labelKeys)
labelKeys - the list of label keys for the Metric.public abstract MetricOptions.Builder setConstantLabels(Map<LabelKey,LabelValue> constantLabels)
constantLabels - the map of constant labels for the Metric.public MetricOptions build()
MetricOptions with the desired options.MetricOptions with the desired options.NullPointerException - if description, OR unit is null, OR labelKeys is null OR any element of labelKeys is null, OR OR constantLabels is null OR any element of constantLabels is null.IllegalArgumentException - if any LabelKey from the labelKeys is in the
constantLabels.