Skip to content

Commit

Permalink
in_prometheus_scrape: add User-Agent HTTP header (#8880)
Browse files Browse the repository at this point in the history
  • Loading branch information
endersonmaia committed May 27, 2024
1 parent dffcd42 commit 5d48061
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/in_prometheus_scrape/prom_scrape.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ static int collect_metrics(struct prom_scrape *ctx)
flb_http_bearer_auth(c, ctx->bearer_token);
}

/* Add User-Agent */
flb_http_add_header(c, "User-Agent", 10, "Fluent-Bit", 10);

ret = flb_http_do(c, &b_sent);
if (ret != 0) {
flb_plg_error(ctx->ins, "http do error");
Expand Down

0 comments on commit 5d48061

Please sign in to comment.