#include <prometheus/gauge.h>
#include <prometheus/registry.h>
#include <iostream>
Go to the source code of this file.
|
#define | ADD_GAUGE_METRIC(method, name, description) |
| add method that is setting specific gauge metric. More...
|
|
#define | ADD_UPDATER_METHOD(method) |
| add updater method. This is used to store lambda function that updates metric, so we can update it periodically Passed method should be added first More...
|
|
#define | ADD_GAUGE_METRIC_WITH_UPDATER(method, name, description) |
| combines ADD_UPDATER_METHOD and ADD_GAUGE_METRIC More...
|
|
◆ ADD_GAUGE_METRIC
#define ADD_GAUGE_METRIC |
( |
|
method, |
|
|
|
name, |
|
|
|
description |
|
) |
| |
Value: void method(double v) { \
static auto& label = addMetric<prometheus::Gauge>(group_name + "_" + name, description).Add({}); \
label.Set(v); \
}
add method that is setting specific gauge metric.
◆ ADD_GAUGE_METRIC_WITH_UPDATER
#define ADD_GAUGE_METRIC_WITH_UPDATER |
( |
|
method, |
|
|
|
name, |
|
|
|
description |
|
) |
| |
Value:
ADD_UPDATER_METHOD(method)
#define ADD_GAUGE_METRIC(method, name, description)
add method that is setting specific gauge metric.
Definition: metrics_group.hpp:13
combines ADD_UPDATER_METHOD and ADD_GAUGE_METRIC
◆ ADD_UPDATER_METHOD
#define ADD_UPDATER_METHOD |
( |
|
method | ) |
|
Value: void method##Updater(MetricGetter getter) { \
updaters_.push_back([this, getter]() { method(getter()); }); \
}
add updater method. This is used to store lambda function that updates metric, so we can update it periodically Passed method
should be added first