Prometheus Client Library for Modern C++
|
A info metric to represent textual information which should not change during process lifetime. More...
Public Member Functions | |
Info ()=default | |
Create a info. | |
ClientMetric | Collect () const |
Get the current value of the info. More... | |
Static Public Attributes | |
static const MetricType | metric_type {MetricType::Info} |
A info metric to represent textual information which should not change during process lifetime.
This class represents the metric type info: https://github.com/OpenObservability/OpenMetrics/blob/98ae26c87b1c3bcf937909a880b32c8be643cc9b/specification/OpenMetrics.md#info Prometheus does not provide this type directly, it is used by emulating a gauge with value 1: https://prometheus.io/docs/concepts/metric_types/#gauge
The value of the info cannot change. Example of infos are:
The class is thread-safe. No concurrent call to any API of this type causes a data race.
ClientMetric prometheus::Info::Collect | ( | ) | const |
Get the current value of the info.
Collect is called by the Registry when collecting metrics.