Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix + various code/logging improvements to retry code
This one is a variety of improvements to the retry code: * Fixed one bug whereby for a failed request, we were not reading the entire response body before trying to log it, which results in an uninformative output like `&{409....`. Here we add a `ReadAll`. * I denested some code so that we have less indentation. * I changed measuring request time to measuring individual requests around `s.HTTPClient.Do` instead of measuring the entire span including all the sleeping the retry block is doing. * I added logging for the amount of time the program is about to go to sleep before a retry. You can still get the total execution time by adding the time for all requests plus the time for all sleeps. * Generally changed some logs around for consistency around format, casing, and punctuation. The impetus is that I was trying to understand the code to debug #642. This might help get some visibility into a solution, but won't solve the problem.
- Loading branch information