]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: add alt_name field to stat_col struct
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 17 Mar 2025 10:45:07 +0000 (11:45 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Fri, 21 Mar 2025 16:04:54 +0000 (17:04 +0100)
alt_name will be used by metric exporters to know how the metric should be
presented to the user. If the alt_name is NULL, the metric should be
ignored. For now only promex exporter will make use of this.

include/haproxy/stats-t.h

index 0b60796b665d74d91f51a064d0329c879adb17a6..14a822d9247fafc0bf55ef80738b5a2bad9c7d40 100644 (file)
@@ -346,6 +346,7 @@ enum stat_idx_info {
 struct stat_col {
        const char *name; /* short name, used notably in CSV headers */
        const char *desc; /* user-friendly description */
+       const char *alt_name; /* name used by some stats provider such as promex addon, ignored if NULL */
 
        uint32_t type;    /* combination of field_nature and field_format */
        uint8_t cap;      /* mask of stats_domain_px_cap to restrain metrics to an object types subset */