|
|
- commit 3a00e5fcc1af121dea16793d47627c16c97fb953
- Author: Christopher Faulet <cfaulet@haproxy.com>
- Date: Wed Nov 27 11:22:37 2019 +0100
-
- BUG/MINOR: contrib/prometheus-exporter: Use HTX errors and not legacy ones
-
- This bug was introduced when the commit 32d634f1 ("MINOR:
- contrib/prometheus-exporter: filter exported metrics by scope") was backported
- to 2.0.
-
- In 2.0, Error chunks exist in raw format (http_err_chunks[]) and in HTX format
- (htx_err_chunks[]). Prometheus exported only supports the HTX. So error must not
- be reported using the raw chunks.
-
- This fix is specific to 2.0. No backport needed.
-
- diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c
- index 56d49a39..cfbfb8c3 100644
- --- a/contrib/prometheus-exporter/service-prometheus.c
- +++ b/contrib/prometheus-exporter/service-prometheus.c
- @@ -2292,7 +2292,7 @@ static int promex_parse_uri(struct appctx *appctx, struct stream_interface *si)
- return 1;
-
- error:
- - err = &http_err_chunks[HTTP_ERR_400];
- + err = &htx_err_chunks[HTTP_ERR_400];
- channel_erase(res);
- res->buf.data = b_data(err);
- memcpy(res->buf.area, b_head(err), b_data(err));
|