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.
Example
constgauge = newGauge('active_users', 42, 'Number of active users', 'user-service'); constmetric = gauge.registry();
Param: name
The name of the metric (without prefix).
Param: value
The current value of the gauge.
Param: label
(Optional) A description or label for the metric.
Param: service
(Optional) The service name associated with the metric. Defaults to 'unknown'.
Param: prefix
(Optional) The prefix for the metric name. Defaults to 'nodejs_'.
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.
Example
Param: name
The name of the metric (without prefix).
Param: value
The current value of the gauge.
Param: label
(Optional) A description or label for the metric.
Param: service
(Optional) The service name associated with the metric. Defaults to 'unknown'.
Param: prefix
(Optional) The prefix for the metric name. Defaults to 'nodejs_'.