Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Meter

An interface to allow the recording metrics.

Metrics are used for recording pre-defined aggregation (Counter), or raw values (ValueRecorder) in which the aggregation and labels for the exported metric are deferred.

Hierarchy

  • Meter

Implemented by

Index

Methods

createCounter

  • Creates a new Counter metric. Generally, this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest.

    Parameters

    • name: string

      the name of the metric.

    • Optional options: MetricOptions

    Returns Counter

createObserver

createUpDownCounter

  • Creates a new UpDownCounter metric. UpDownCounter is a synchronous instrument and very similar to Counter except that Add(increment) supports negative increments. It is generally useful for capturing changes in an amount of resources used, or any quantity that rises and falls during a request. Example uses for UpDownCounter:

    1. count the number of active requests.
    2. count memory in use by instrumenting new and delete.
    3. count queue size by instrumenting enqueue and dequeue.
    4. count semaphore up and down operations.

    Parameters

    • name: string

      the name of the metric.

    • Optional options: MetricOptions

    Returns UpDownCounter

createValueRecorder