Package io.grpc

Class DoubleCounterMetricInstrument

java.lang.Object
io.grpc.DoubleCounterMetricInstrument
All Implemented Interfaces:
MetricInstrument

@Internal public final class DoubleCounterMetricInstrument extends Object
Represents a double-valued counter metric instrument.
  • Field Details

    • index

      protected final int index
    • name

      protected final String name
    • description

      protected final String description
    • unit

      protected final String unit
    • requiredLabelKeys

      protected final List<String> requiredLabelKeys
    • optionalLabelKeys

      protected final List<String> optionalLabelKeys
    • enableByDefault

      protected final boolean enableByDefault
  • Constructor Details

    • DoubleCounterMetricInstrument

      public DoubleCounterMetricInstrument(int index, String name, String description, String unit, List<String> requiredLabelKeys, List<String> optionalLabelKeys, boolean enableByDefault)
  • Method Details

    • getIndex

      public int getIndex()
      Description copied from interface: MetricInstrument
      Returns the unique index of this metric instrument.
      Specified by:
      getIndex in interface MetricInstrument
      Returns:
      the index of the metric instrument.
    • getName

      public String getName()
      Description copied from interface: MetricInstrument
      Returns the name of the metric.
      Specified by:
      getName in interface MetricInstrument
      Returns:
      the name of the metric.
    • getDescription

      public String getDescription()
      Description copied from interface: MetricInstrument
      Returns a description of the metric.
      Specified by:
      getDescription in interface MetricInstrument
      Returns:
      a description of the metric.
    • getUnit

      public String getUnit()
      Description copied from interface: MetricInstrument
      Returns the unit of measurement for the metric.
      Specified by:
      getUnit in interface MetricInstrument
      Returns:
      the unit of measurement.
    • getRequiredLabelKeys

      public List<String> getRequiredLabelKeys()
      Description copied from interface: MetricInstrument
      Returns a list of required label keys for this metric instrument.
      Specified by:
      getRequiredLabelKeys in interface MetricInstrument
      Returns:
      a list of required label keys.
    • getOptionalLabelKeys

      public List<String> getOptionalLabelKeys()
      Description copied from interface: MetricInstrument
      Returns a list of optional label keys for this metric instrument.
      Specified by:
      getOptionalLabelKeys in interface MetricInstrument
      Returns:
      a list of optional label keys.
    • isEnableByDefault

      public boolean isEnableByDefault()
      Description copied from interface: MetricInstrument
      Indicates whether this metric instrument is enabled by default.
      Specified by:
      isEnableByDefault in interface MetricInstrument
      Returns:
      true if this metric instrument is enabled by default, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object