From: Florian Forster Date: Mon, 20 Jul 2020 19:30:05 +0000 (+0200) Subject: src/daemon/metric.[ch]: Improve doc comments. X-Git-Tag: 6.0.0-rc0~145^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F3508%2Fhead;p=thirdparty%2Fcollectd.git src/daemon/metric.[ch]: Improve doc comments. --- diff --git a/src/daemon/metric.c b/src/daemon/metric.c index 60625a9f0..16052be61 100644 --- a/src/daemon/metric.c +++ b/src/daemon/metric.c @@ -50,7 +50,7 @@ int value_marshal_text(strbuf_t *buf, value_t v, metric_type_t type) { case METRIC_TYPE_COUNTER: return strbuf_printf(buf, "%" PRIu64, v.counter); default: - ERROR("Unknown metric value type: %d", type); + ERROR("Unknown metric value type: %d", (int)type); return EINVAL; } } diff --git a/src/daemon/metric.h b/src/daemon/metric.h index f849a3703..0419304ed 100644 --- a/src/daemon/metric.h +++ b/src/daemon/metric.h @@ -90,7 +90,7 @@ typedef struct metric_family_s metric_family_t; /* metric_t is a metric inside a metric family. */ typedef struct { - metric_family_t *family; /* for family->name and family->type */ + metric_family_t *family; /* backreference for family->name and family->type */ label_set_t label; value_t value; @@ -100,9 +100,10 @@ typedef struct { meta_data_t *meta; } metric_t; -/* metric_identity writes the identity of the metric "m" to "buf". An example - * string is: +/* metric_identity writes the identity of the metric "m" to "buf", using the + * OpenMetrics / Prometheus plain text exposition format. * + * Example: * "http_requests_total{method=\"post\",code=\"200\"}" */ int metric_identity(strbuf_t *buf, metric_t const *m);