Package io.grpc
Class LongCounterMetricInstrument
java.lang.Object
io.grpc.LongCounterMetricInstrument
- All Implemented Interfaces:
MetricInstrument
Represents a long-valued counter 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()
-
Field Details
-
index
protected final int index -
name
-
description
-
unit
-
requiredLabelKeys
-
optionalLabelKeys
-
enableByDefault
protected final boolean enableByDefault
-
-
Constructor Details
-
LongCounterMetricInstrument
-
-
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
-