Closed ogero closed 3 years ago
LGTM! Tested locally with a 1 request per minute throttle and the elastic apps seems to follow it fine. Looks like
go-retryablehttp
is not logging the client being throttled but it does log any error. Is this something that maybe we would like to log?
Thanks for testing @anthonythleung.
Good observation! The beat will log at INFO level by default, and the majority of the logs coming from retryablehttp are sent on DEBUG level.
To display those logs, you can use the -d
flag when running the beat:
./eventsapibeat -c eventsapibeat.yml --d="*" -e
Ah I see, I totally missed that. This works great then. Thanks!
This PR makes the API HTTPClient to be a
retryablehttp.Client
(go-retryablehttp) which will retry requests when the response status code is429
.