Package io.opencensus.metrics.export
Class MetricDescriptor
- java.lang.Object
-
- io.opencensus.metrics.export.MetricDescriptor
-
- Direct Known Subclasses:
AutoValue_MetricDescriptor
@ExperimentalApi @Immutable public abstract class MetricDescriptor extends java.lang.Object
MetricDescriptor
defines aMetric
type and its schema.- Since:
- 0.17
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetricDescriptor.Type
The kind of metric.
-
Constructor Summary
Constructors Constructor Description MetricDescriptor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MetricDescriptor
create(java.lang.String name, java.lang.String description, java.lang.String unit, MetricDescriptor.Type type, java.util.List<LabelKey> labelKeys)
Creates aMetricDescriptor
.abstract java.lang.String
getDescription()
Returns the description of this metric descriptor.abstract java.util.List<LabelKey>
getLabelKeys()
Returns the label keys associated with this metric descriptor.abstract java.lang.String
getName()
Returns the metric descriptor name.abstract MetricDescriptor.Type
getType()
Returns the type of this metric descriptor.abstract java.lang.String
getUnit()
Returns the unit of this metric descriptor.
-
-
-
Method Detail
-
create
public static MetricDescriptor create(java.lang.String name, java.lang.String description, java.lang.String unit, MetricDescriptor.Type type, java.util.List<LabelKey> labelKeys)
Creates aMetricDescriptor
.- Parameters:
name
- name ofMetricDescriptor
.description
- description ofMetricDescriptor
.unit
- the metric unit.type
- type ofMetricDescriptor
.labelKeys
- the label keys associated with theMetricDescriptor
.- Returns:
- a
MetricDescriptor
. - Since:
- 0.17
-
getName
public abstract java.lang.String getName()
Returns the metric descriptor name.- Returns:
- the metric descriptor name.
- Since:
- 0.17
-
getDescription
public abstract java.lang.String getDescription()
Returns the description of this metric descriptor.- Returns:
- the description of this metric descriptor.
- Since:
- 0.17
-
getUnit
public abstract java.lang.String getUnit()
Returns the unit of this metric descriptor.- Returns:
- the unit of this metric descriptor.
- Since:
- 0.17
-
getType
public abstract MetricDescriptor.Type getType()
Returns the type of this metric descriptor.- Returns:
- the type of this metric descriptor.
- Since:
- 0.17
-
getLabelKeys
public abstract java.util.List<LabelKey> getLabelKeys()
Returns the label keys associated with this metric descriptor.- Returns:
- the label keys associated with this metric descriptor.
- Since:
- 0.17
-
-