Package io.opencensus.metrics
Class AutoValue_MetricOptions.Builder
- java.lang.Object
-
- io.opencensus.metrics.MetricOptions.Builder
-
- io.opencensus.metrics.AutoValue_MetricOptions.Builder
-
- Enclosing class:
- AutoValue_MetricOptions
static final class AutoValue_MetricOptions.Builder extends MetricOptions.Builder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<LabelKey,LabelValue>constantLabelsprivate java.lang.Stringdescriptionprivate java.util.List<LabelKey>labelKeysprivate java.lang.Stringunit
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) MetricOptionsautoBuild()(package private) java.util.Map<LabelKey,LabelValue>getConstantLabels()(package private) java.util.List<LabelKey>getLabelKeys()MetricOptions.BuildersetConstantLabels(java.util.Map<LabelKey,LabelValue> constantLabels)Sets the map of constant labels (they will be added to all the TimeSeries) for the Metric.MetricOptions.BuildersetDescription(java.lang.String description)Sets the description of the Metric.MetricOptions.BuildersetLabelKeys(java.util.List<LabelKey> labelKeys)Sets the list of label keys for the Metric.MetricOptions.BuildersetUnit(java.lang.String unit)Sets the unit of the Metric.-
Methods inherited from class io.opencensus.metrics.MetricOptions.Builder
build
-
-
-
-
Field Detail
-
description
private java.lang.String description
-
unit
private java.lang.String unit
-
labelKeys
private java.util.List<LabelKey> labelKeys
-
constantLabels
private java.util.Map<LabelKey,LabelValue> constantLabels
-
-
Method Detail
-
setDescription
public MetricOptions.Builder setDescription(java.lang.String description)
Description copied from class:MetricOptions.BuilderSets the description of the Metric.- Specified by:
setDescriptionin classMetricOptions.Builder- Parameters:
description- the description of the Metric.- Returns:
- this.
-
setUnit
public MetricOptions.Builder setUnit(java.lang.String unit)
Description copied from class:MetricOptions.BuilderSets the unit of the Metric.- Specified by:
setUnitin classMetricOptions.Builder- Parameters:
unit- the unit of the Metric.- Returns:
- this.
-
setLabelKeys
public MetricOptions.Builder setLabelKeys(java.util.List<LabelKey> labelKeys)
Description copied from class:MetricOptions.BuilderSets the list of label keys for the Metric.- Specified by:
setLabelKeysin classMetricOptions.Builder- Parameters:
labelKeys- the list of label keys for the Metric.- Returns:
- this.
-
getLabelKeys
java.util.List<LabelKey> getLabelKeys()
- Specified by:
getLabelKeysin classMetricOptions.Builder
-
setConstantLabels
public MetricOptions.Builder setConstantLabels(java.util.Map<LabelKey,LabelValue> constantLabels)
Description copied from class:MetricOptions.BuilderSets the map of constant labels (they will be added to all the TimeSeries) for the Metric.- Specified by:
setConstantLabelsin classMetricOptions.Builder- Parameters:
constantLabels- the map of constant labels for the Metric.- Returns:
- this.
-
getConstantLabels
java.util.Map<LabelKey,LabelValue> getConstantLabels()
- Specified by:
getConstantLabelsin classMetricOptions.Builder
-
autoBuild
MetricOptions autoBuild()
- Specified by:
autoBuildin classMetricOptions.Builder
-
-