Open rogercoll opened 1 month ago
Pinging code owners:
receiver/httpcheck: @codeboten
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Sounds good to me. Probably requires to be added to confighttp.
+1 to add the config option to confihttp (e.g max_redirects
)
ref https://github.com/open-telemetry/opentelemetry-collector/issues/10870
Component(s)
receiver/httpcheck
Is your feature request related to a problem? Please describe.
An HTTP endpoint can return either 307 or 308 as status code when it has been redirected. Let's say I want to monitor a temporal redirection (307) and act upon changes (e.g. end of redirection → 2xx).
For example, the
http://wikipedia.com
endpoint is redirected to thehttps://wikipedia.com
but I don't want to ensure its reachability but its redirection. Receiver config:The default http client seems to be following redirects, thus getting a 2xx instead:
Describe the solution you'd like
A config option to define the maximum number of redirects or completely disable them by default.
For example, Elastic uses the max_redirects configuration options which defaults to 0 (so no redirects are followed, but the status of the redirect is reported)
Describe alternatives you've considered
Adding the configuration option in the confighttp
Additional context
No response