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.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.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:MetricInstrument
Returns the unique index of this metric instrument.- Specified by:
getIndex
in interfaceMetricInstrument
- Returns:
- the index of the metric instrument.
-
getName
Description copied from interface:MetricInstrument
Returns the name of the metric.- Specified by:
getName
in interfaceMetricInstrument
- Returns:
- the name of the metric.
-
getDescription
Description copied from interface:MetricInstrument
Returns a description of the metric.- Specified by:
getDescription
in interfaceMetricInstrument
- Returns:
- a description of the metric.
-
getUnit
Description copied from interface:MetricInstrument
Returns the unit of measurement for the metric.- Specified by:
getUnit
in interfaceMetricInstrument
- Returns:
- the unit of measurement.
-
getRequiredLabelKeys
Description copied from interface:MetricInstrument
Returns a list of required label keys for this metric instrument.- Specified by:
getRequiredLabelKeys
in interfaceMetricInstrument
- Returns:
- a list of required label keys.
-
getOptionalLabelKeys
Description copied from interface:MetricInstrument
Returns a list of optional label keys for this metric instrument.- Specified by:
getOptionalLabelKeys
in interfaceMetricInstrument
- 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 interfaceMetricInstrument
- Returns:
true
if this metric instrument is enabled by default,false
otherwise.
-
toString
-