@stephen-shopopop/node-metrics
    Preparing search index...

    Represents a Prometheus counter metric.

    This class is used to build and register counter metrics in Prometheus format.

    const counter = new Counter('requests_total', 5, 'Total number of requests', 'my-service');
    const metric = counter.registry();

    The name of the metric.

    The value of the counter.

    An optional description or label for the metric. Defaults to an empty string.

    The name of the service reporting the metric. Defaults to 'unknown'.

    The prefix for the metric name. Defaults to 'nodejs_'.

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • name: string
      • value: number
      • label: string = ''
      • service: string = 'unknown'
      • prefix: string = 'nodejs_'

      Returns Counter

    Properties

    label: string = ''
    name: string
    prefix: string = 'nodejs_'
    service: string = 'unknown'
    value: number

    Methods