8#ifndef ZEPHYR_INCLUDE_PROMETHEUS_GAUGE_H_
9#define ZEPHYR_INCLUDE_PROMETHEUS_GAUGE_H_
59#define PROMETHEUS_GAUGE_DEFINE(_name, _desc, _label, _collector, ...) \
60 STRUCT_SECTION_ITERABLE(prometheus_gauge, _name) = { \
61 .base.name = STRINGIFY(_name), \
62 .base.type = PROMETHEUS_GAUGE, \
63 .base.description = _desc, \
64 .base.labels[0] = __DEBRACKET _label, \
65 .base.num_labels = 1, \
66 .base.collector = _collector, \
68 .user_data = COND_CODE_0( \
69 NUM_VA_ARGS_LESS_1(LIST_DROP_EMPTY(__VA_ARGS__, _)), \
71 (GET_ARG_N(1, __VA_ARGS__))), \
int prometheus_gauge_set(struct prometheus_gauge *gauge, double value)
Set the value of a Prometheus gauge metric.
Prometheus metric interface.
Type used to represent a Prometheus gauge metric.
Definition gauge.h:29
void * user_data
User data.
Definition gauge.h:35
struct prometheus_metric base
Base of the Prometheus gauge metric.
Definition gauge.h:31
double value
Value of the Prometheus gauge metric.
Definition gauge.h:33
Type used to represent a Prometheus metric base.
Definition metric.h:47