Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the do-agent restarts, it is likely that it'll send a metric faster than rate limitation will allow, resulting in a 429 error. This can safely be ignored. The code adjustment herein determines if the first response from a metric submission is an error with a status of 429. If so, it ignores it.
Looking to extract the status code from the error in Flush here:
do-agent/pkg/clients/tsclient/client.go
Line 428 in d626f03