Skip to content

Commit 6aed012

Browse files
endersonmaiaedsiper
authored andcommitted
in_prometheus_scrape: add User-Agent HTTP header (#8880)
Signed-off-by: Enderson Maia <[email protected]>
1 parent dffcd42 commit 6aed012

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/in_prometheus_scrape/prom_scrape.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ static int collect_metrics(struct prom_scrape *ctx)
107107
flb_http_bearer_auth(c, ctx->bearer_token);
108108
}
109109

110+
/* Add User-Agent */
111+
flb_http_add_header(c, "User-Agent", 10, "Fluent-Bit", 10);
112+
110113
ret = flb_http_do(c, &b_sent);
111114
if (ret != 0) {
112115
flb_plg_error(ctx->ins, "http do error");

0 commit comments

Comments
 (0)