Skip to main content

IncrementalMetricinterface

Base interface for non-observable metrics with incremental values, such as Counter and UpDownCounter.

Properties (2)

Property Type Default Required Description
settings⚓︎ MetricSettings x

Settings used to create the metric.

started⚓︎ boolean x

Whether the metric is started.

3 Methods

add()⚓︎

(count: number, data?: TData, options?: MetricPublishOptions) => void

Parameters (3)

Name Type Required Description
count⚓︎ number x
data⚓︎ TData x x
options⚓︎ MetricPublishOptions x x

start()⚓︎

() => Promise<void>

Starts the metric, allowing it to publish values.

stop()⚓︎

() => Promise<void>

Stops the metric, meaning it can no long publish values.