Package io.grpc

Interface MetricInstrument

All Known Subinterfaces:
CallbackMetricInstrument
All Known Implementing Classes:
DoubleCounterMetricInstrument, DoubleHistogramMetricInstrument, LongCounterMetricInstrument, LongGaugeMetricInstrument, LongHistogramMetricInstrument

@Internal public interface MetricInstrument
Represents a metric instrument. Metric instrument contains information used to describe a metric.
  • Method Details

    • getIndex

      int getIndex()
      Returns the unique index of this metric instrument.
      Returns:
      the index of the metric instrument.
    • getName

      String getName()
      Returns the name of the metric.
      Returns:
      the name of the metric.
    • getDescription

      String getDescription()
      Returns a description of the metric.
      Returns:
      a description of the metric.
    • getUnit

      String getUnit()
      Returns the unit of measurement for the metric.
      Returns:
      the unit of measurement.
    • getRequiredLabelKeys

      List<String> getRequiredLabelKeys()
      Returns a list of required label keys for this metric instrument.
      Returns:
      a list of required label keys.
    • getOptionalLabelKeys

      List<String> getOptionalLabelKeys()
      Returns a list of optional label keys for this metric instrument.
      Returns:
      a list of optional label keys.
    • isEnableByDefault

      boolean isEnableByDefault()
      Indicates whether this metric instrument is enabled by default.
      Returns:
      true if this metric instrument is enabled by default, false otherwise.