Package io.grpc
Interface MetricInstrument
- All Known Subinterfaces:
CallbackMetricInstrument
- All Known Implementing Classes:
DoubleCounterMetricInstrument
,DoubleHistogramMetricInstrument
,LongCounterMetricInstrument
,LongGaugeMetricInstrument
,LongHistogramMetricInstrument
Represents a metric instrument. Metric instrument contains information used to describe a metric.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a description of the metric.int
getIndex()
Returns the unique index of this metric instrument.getName()
Returns the name of the metric.Returns a list of optional label keys for this metric instrument.Returns a list of required label keys for this metric instrument.getUnit()
Returns the unit of measurement for the metric.boolean
Indicates whether this metric instrument is enabled by default.
-
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
Returns a list of required label keys for this metric instrument.- Returns:
- a list of required label keys.
-
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.
-