Package io.opencensus.metrics
Class MetricOptions
java.lang.Object
io.opencensus.metrics.MetricOptions
- Direct Known Subclasses:
AutoValue_MetricOptions
Options for every metric added to the
MetricRegistry
.- Since:
- 0.20
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricOptions.Builder
builder()
Returns a newMetricOptions.Builder
with default options.abstract Map
<LabelKey, LabelValue> Returns the map of constant labels (they will be added to all the TimeSeries) for the Metric.abstract String
Returns the description of the Metric.Returns the list of label keys for the Metric.abstract String
getUnit()
Returns the unit of the Metric.
-
Constructor Details
-
MetricOptions
MetricOptions()
-
-
Method Details
-
getDescription
Returns the description of the Metric.Default value is
""
.- Returns:
- the description of the Metric.
- Since:
- 0.20
-
getUnit
Returns the unit of the Metric.Default value is
"1"
.- Returns:
- the unit of the Metric.
- Since:
- 0.20
-
getLabelKeys
Returns the list of label keys for the Metric.Default value is
Collections.emptyList()
.- Returns:
- the list of label keys for the Metric.
- Since:
- 0.20
-
getConstantLabels
Returns the map of constant labels (they will be added to all the TimeSeries) for the Metric.Default value is
Collections.emptyMap()
.- Returns:
- the map of constant labels for the Metric.
- Since:
- 0.21
-
builder
Returns a newMetricOptions.Builder
with default options.- Returns:
- a new
Builder
with default options. - Since:
- 0.20.0
-