]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: promex: Remove Help prefix repeated twice for each metric
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Jul 2024 08:33:03 +0000 (10:33 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Jul 2024 08:50:27 +0000 (10:50 +0200)
When the support for modules was added, the function producing the #HELP
line of each metric was refactored. Since then, the prefix "#HELP
<metric-name>" is printed twice because a code block was not removed. It is
now fixed.

This patch must be backported to 3.0.

addons/promex/service-prometheus.c

index 4e0bc68e10da23a34d2ddf2e00f2c21e96d11096..99aa464825f16612ab49e784b9608b369f5d8cb8 100644 (file)
@@ -438,11 +438,6 @@ static int promex_dump_ts_header(const struct ist name, const struct ist desc, e
                        t = ist("gauge");
        }
 
-       if (istcat(out, ist("# HELP "), max) == -1 ||
-           istcat(out, name, max) == -1 ||
-           istcat(out, ist(" "), max) == -1)
-               goto full;
-
        if (istcat(out, ist("# HELP "), max) == -1 ||
            istcat(out, name, max) == -1 ||
            istcat(out, ist(" "), max) == -1 ||