Adapt comments from prometheus data model better

This commit is contained in:
2024-07-12 13:27:22 -07:00
parent 3288c583e4
commit e394e3d96a

View File

@@ -90,18 +90,19 @@ struct __attribute__((__visibility__("default"))) ConflictSet {
/** Experimental! */ /** Experimental! */
struct MetricsV1 { struct MetricsV1 {
/** A null-terminated string with static lifetime. Matches the regex /** A null-terminated string with static lifetime. Identifies this metric.
* [a-zA-Z_:][a-zA-Z0-9_:]* * Matches the regex [a-zA-Z_:][a-zA-Z0-9_:]*
*/ */
const char *name; const char *name;
/** A null-terminated string with static lifetime. May contain any sequence /** A null-terminated string with static lifetime. Describes this metric.
* of UTF-8 characters (after the metric name), but the backslash and the * May contain any sequence of UTF-8 characters, but the backslash and the
* line feed characters have to be escaped as \\ and \n, respectively. * line feed characters are escaped as \\ and \n, respectively.
*/ */
const char *help; const char *help;
/** Counters are >= 0 and non-decreasing. Gauges are any value. */ /** Counters are >= 0 and non-decreasing. Gauges are any value. */
enum Type { Counter, Gauge } type; enum Type { Counter, Gauge } type;
/** Get the most up-to-date value available for this metric. Thread-safe. */ /** Get the most up-to-date (best effort) value for this metric.
* Thread-safe. */
double getValue() const; double getValue() const;
/** @private */ /** @private */
void *p; void *p;