Class MetricDescriptor

java.lang.Object
io.opencensus.metrics.export.MetricDescriptor
Direct Known Subclasses:
AutoValue_MetricDescriptor

@ExperimentalApi @Immutable public abstract class MetricDescriptor extends Object
MetricDescriptor defines a Metric type and its schema.
Since:
0.17
  • Constructor Details

    • MetricDescriptor

      MetricDescriptor()
  • Method Details

    • create

      public static MetricDescriptor create(String name, String description, String unit, MetricDescriptor.Type type, List<LabelKey> labelKeys)
      Creates a MetricDescriptor.
      Parameters:
      name - name of MetricDescriptor.
      description - description of MetricDescriptor.
      unit - the metric unit.
      type - type of MetricDescriptor.
      labelKeys - the label keys associated with the MetricDescriptor.
      Returns:
      a MetricDescriptor.
      Since:
      0.17
    • getName

      public abstract String getName()
      Returns the metric descriptor name.
      Returns:
      the metric descriptor name.
      Since:
      0.17
    • getDescription

      public abstract String getDescription()
      Returns the description of this metric descriptor.
      Returns:
      the description of this metric descriptor.
      Since:
      0.17
    • getUnit

      public abstract 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 List<LabelKey> getLabelKeys()
      Returns the label keys associated with this metric descriptor.
      Returns:
      the label keys associated with this metric descriptor.
      Since:
      0.17