beats icon indicating copy to clipboard operation
beats copied to clipboard

Report error response body in HTTP helper

Open miltonhultgren opened this issue 2 years ago • 2 comments

In https://github.com/elastic/beats/blob/main/metricbeat/helper/http.go#L179 we don't report the body of the response when an error happens, making it harder to understand why the particular HTTP request failed. This can sometimes make it harder to capture errors that are transient.

It would be great if we could read the body stream and print that out as well with the error.

miltonhultgren avatar Jun 26 '23 10:06 miltonhultgren

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

elasticmachine avatar Jun 26 '23 10:06 elasticmachine

Hi! We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

botelastic[bot] avatar Jun 25 '24 10:06 botelastic[bot]