Package io.grpc
Class LongGaugeMetricInstrument
java.lang.Object
io.grpc.LongGaugeMetricInstrument
- All Implemented Interfaces:
CallbackMetricInstrument,MetricInstrument
@Internal
public final class LongGaugeMetricInstrument
extends Object
implements CallbackMetricInstrument
Represents a long-valued gauge metric instrument.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a description of the metric.intgetIndex()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.booleanIndicates whether this metric instrument is enabled by default.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.grpc.MetricInstrument
getDescription, getIndex, getName, getOptionalLabelKeys, getRequiredLabelKeys, getUnit, isEnableByDefault
-
Field Details
-
index
protected final int index -
name
-
description
-
unit
-
requiredLabelKeys
-
optionalLabelKeys
-
enableByDefault
protected final boolean enableByDefault
-
-
Constructor Details
-
LongGaugeMetricInstrument
-
-
Method Details
-
getIndex
public int getIndex()Description copied from interface:MetricInstrumentReturns the unique index of this metric instrument.- Specified by:
getIndexin interfaceMetricInstrument- Returns:
- the index of the metric instrument.
-
getName
Description copied from interface:MetricInstrumentReturns the name of the metric.- Specified by:
getNamein interfaceMetricInstrument- Returns:
- the name of the metric.
-
getDescription
Description copied from interface:MetricInstrumentReturns a description of the metric.- Specified by:
getDescriptionin interfaceMetricInstrument- Returns:
- a description of the metric.
-
getUnit
Description copied from interface:MetricInstrumentReturns the unit of measurement for the metric.- Specified by:
getUnitin interfaceMetricInstrument- Returns:
- the unit of measurement.
-
getRequiredLabelKeys
Description copied from interface:MetricInstrumentReturns a list of required label keys for this metric instrument.- Specified by:
getRequiredLabelKeysin interfaceMetricInstrument- Returns:
- a list of required label keys.
-
getOptionalLabelKeys
Description copied from interface:MetricInstrumentReturns a list of optional label keys for this metric instrument.- Specified by:
getOptionalLabelKeysin interfaceMetricInstrument- Returns:
- a list of optional label keys.
-
isEnableByDefault
public boolean isEnableByDefault()Description copied from interface:MetricInstrumentIndicates whether this metric instrument is enabled by default.- Specified by:
isEnableByDefaultin interfaceMetricInstrument- Returns:
trueif this metric instrument is enabled by default,falseotherwise.
-
toString
-