Interface: MetricUpDownCounter
Experimental
A metric that supports adding signed values as an up-down counter.
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:
"up-down-counter"
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:
"int"
Experimental
The type of value recorded by the metric. Either int or float.
Overrides
Methods
add()
add(
value,extraTags?):void
Experimental
Add the given value to the up-down counter. Value may be negative.
Parameters
value
number
Value to add (can be positive or negative).
extraTags?
Extra tags if any.
Returns
void
withTags()
withTags(
tags):MetricUpDownCounter
Experimental
Return a clone of this up-down counter, with additional tags.
Parameters
tags
Tags to append to existing tags.
Returns
MetricUpDownCounter