Interface: MetricCounter
common.MetricCounter
A metric that supports adding values as a counter.
The Metric API is an experimental feature and may be subject to change.
Hierarchy
-
↳
MetricCounter
Properties
description
• Optional
description: string
The description of the metric, if any.
Inherited from
name
• name: string
The name of the metric.
Inherited from
unit
• Optional
unit: string
The unit of the metric, if any.
Inherited from
Methods
add
▸ add(value
, extraTags?
): void
Add the given value to the counter.
Parameters
Name | Type | Description |
---|---|---|
value | number | Value to add. |
extraTags? | MetricTags | Extra tags if any. |
Returns
void
withTags
▸ withTags(tags
): MetricCounter
Return a clone of this counter, with additional tags.
Parameters
Name | Type | Description |
---|---|---|
tags | MetricTags | Tags to append to existing tags. |