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

    Represents a Prometheus Gauge metric for monitoring purposes.

    A Gauge is a metric that represents a single numerical value that can arbitrarily go up and down. This class helps construct a Prometheus-compatible gauge metric with optional labeling and service identification.

    const gauge = new Gauge('active_users', 42, 'Number of active users', 'user-service');
    const metric = gauge.registry();

    The name of the metric (without prefix).

    The current value of the gauge.

    (Optional) A description or label for the metric.

    (Optional) The service name associated with the metric. Defaults to 'unknown'.

    (Optional) The prefix for the metric name. Defaults to 'nodejs_'.

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • name: string
      • value: number | { [key: string]: number }
      • label: string = ''
      • service: string = 'unknown'
      • prefix: string = 'nodejs_'

      Returns Gauge

    Properties

    label: string = ''
    name: string
    prefix: string = 'nodejs_'
    service: string = 'unknown'
    value: number | { [key: string]: number }

    Methods