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
MetricDescriptordefines aMetrictype and its schema.- Since:
- 0.17
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetricDescriptor.TypeThe 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 MetricDescriptorcreate(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.StringgetDescription()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.StringgetName()Returns the metric descriptor name.abstract MetricDescriptor.TypegetType()Returns the type of this metric descriptor.abstract java.lang.StringgetUnit()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
-
-