@ExperimentalApi @Immutable public abstract class MetricDescriptor extends Object
MetricDescriptor defines a Metric type and its schema.| Modifier and Type | Class and Description |
|---|---|
static class |
MetricDescriptor.Type
The kind of metric.
|
| Modifier and Type | Method and Description |
|---|---|
static MetricDescriptor |
create(String name,
String description,
String unit,
MetricDescriptor.Type type,
List<LabelKey> labelKeys)
Creates a
MetricDescriptor. |
abstract String |
getDescription()
Returns the description of this metric descriptor.
|
abstract List<LabelKey> |
getLabelKeys()
Returns the label keys associated with this metric descriptor.
|
abstract String |
getName()
Returns the metric descriptor name.
|
abstract MetricDescriptor.Type |
getType()
Returns the type of this metric descriptor.
|
abstract String |
getUnit()
Returns the unit of this metric descriptor.
|
public static MetricDescriptor create(String name, String description, String unit, MetricDescriptor.Type type, List<LabelKey> labelKeys)
MetricDescriptor.name - name of MetricDescriptor.description - description of MetricDescriptor.unit - the metric unit.type - type of MetricDescriptor.labelKeys - the label keys associated with the MetricDescriptor.MetricDescriptor.public abstract String getName()
public abstract String getDescription()
public abstract String getUnit()
public abstract MetricDescriptor.Type getType()