Package io.grpc
Interface MetricInstrument
-
- All Known Subinterfaces:
CallbackMetricInstrument
- All Known Implementing Classes:
DoubleCounterMetricInstrument,DoubleHistogramMetricInstrument,LongCounterMetricInstrument,LongGaugeMetricInstrument,LongHistogramMetricInstrument,PartialMetricInstrument
@Internal public interface MetricInstrument
Represents a metric instrument. Metric instrument contains information used to describe a metric.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDescription()Returns a description of the metric.intgetIndex()Returns the unique index of this metric instrument.java.lang.StringgetName()Returns the name of the metric.java.util.List<java.lang.String>getOptionalLabelKeys()Returns a list of optional label keys for this metric instrument.java.util.List<java.lang.String>getRequiredLabelKeys()Returns a list of required label keys for this metric instrument.java.lang.StringgetUnit()Returns the unit of measurement for the metric.booleanisEnableByDefault()Indicates whether this metric instrument is enabled by default.
-
-
-
Method Detail
-
getIndex
int getIndex()
Returns the unique index of this metric instrument.- Returns:
- the index of the metric instrument.
-
getName
java.lang.String getName()
Returns the name of the metric.- Returns:
- the name of the metric.
-
getDescription
java.lang.String getDescription()
Returns a description of the metric.- Returns:
- a description of the metric.
-
getUnit
java.lang.String getUnit()
Returns the unit of measurement for the metric.- Returns:
- the unit of measurement.
-
getRequiredLabelKeys
java.util.List<java.lang.String> getRequiredLabelKeys()
Returns a list of required label keys for this metric instrument.- Returns:
- a list of required label keys.
-
getOptionalLabelKeys
java.util.List<java.lang.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:
trueif this metric instrument is enabled by default,falseotherwise.
-
-