Recently I sent a small patch so that the User-Agent would be sent to in_prometheus_scraper HTTP request, but then I thought that this could be the default behavior for every HTTP requests from fluent-bit.
I'll try to map on this issue all the places we could have this added, and if it's of interest of the maintainers, I can start working on PRs to tackle each of them individually.
Proposal
According to HTTP reference from Mozilla1, we should have something like:
User-Agent: Fluent-Bit/3.0.6 (input: prometheus_scrape, Git commit: 9af65e2c36a2c36e75b93cab6a92bf29c307ec9e)
Where to add this change
Ideally, we should have a well formed User-Agent like:
User-Agent: Fluent-Bit/3.0.6 (input: in_prometheus_scrape, Git commit: 9af65e2c36a2c36e75b93cab6a92bf29c307ec9e)
And that would change based on the plugin used to make the requests.
Originally posted by @endersonmaia in #8880 (comment)
Recently I sent a small patch so that the
User-Agentwould be sent toin_prometheus_scraperHTTP request, but then I thought that this could be the default behavior for every HTTP requests from fluent-bit.I'll try to map on this issue all the places we could have this added, and if it's of interest of the maintainers, I can start working on PRs to tackle each of them individually.
Proposal
According to HTTP reference from Mozilla1, we should have something like:
User-Agent: Fluent-Bit/3.0.6 (input: prometheus_scrape, Git commit: 9af65e2c36a2c36e75b93cab6a92bf29c307ec9e)Where to add this change
Ideally, we should have a well formed User-Agent like:
User-Agent: Fluent-Bit/3.0.6 (input: in_prometheus_scrape, Git commit: 9af65e2c36a2c36e75b93cab6a92bf29c307ec9e)And that would change based on the plugin used to make the requests.
Originally posted by @endersonmaia in #8880 (comment)
Footnotes
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent ↩