Interface: MetricGauge
Experimental
A metric that supports setting values.
The Metric API is an experimental feature and may be subject to change.
Extends
Properties
description?
optionaldescription?:string
Experimental
The description of the metric, if any.
Inherited from
kind
kind:
"gauge"
Experimental
The kind of the metric (e.g. counter, histogram, gauge).
Overrides
name
name:
string
Experimental
The name of the metric.
Inherited from
unit?
optionalunit?:string
Experimental
The unit of the metric, if any.
Inherited from
valueType
valueType:
NumericMetricValueType
Experimental
The type of value recorded by the metric. Either int or float.
Inherited from
Methods
set()
set(
value,extraTags?):void
Experimental
Set the given value on the gauge.
Parameters
value
number
Value to set.
extraTags?
Extra tags if any.
Returns
void
withTags()
withTags(
tags):MetricGauge
Experimental
Return a clone of this gauge, with additional tags.
Parameters
tags
Tags to append to existing tags.
Returns
MetricGauge