Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry on failed upload #46

Open
kolesnikovae opened this issue Sep 8, 2023 · 4 comments
Open

Retry on failed upload #46

kolesnikovae opened this issue Sep 8, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@kolesnikovae
Copy link
Contributor

kolesnikovae commented Sep 8, 2023

Requests failed with codes 5xx and 429 (rate limited) should be retried with exponential backoff interval and max number of attempts per request.

@kolesnikovae kolesnikovae added the enhancement New feature or request label Sep 8, 2023
@craigpastro
Copy link

If you don't mind letting *resty.Client from https://github.com/go-resty/resty replace *http.Client I think this can be done rather painlessly and nicely. If so I can try a PR.

@kolesnikovae
Copy link
Contributor Author

As of now pyroscope-go has zero dependencies and is very lightweight. I'm not very sure if adding resty (which is primarily a very feature-rich REST client) exclusively for a basic retry mechanism is worth it

@craigpastro
Copy link

Hi @kolesnikovae. Yes, that would be a shame for sure. I know there is some subtlety with retries and trying to use the same connection that one would hope resty deals with (but I haven't actually read the code), but that is probably over thinking it.

@mohammed90
Copy link

Hashicorp's package retryablehttp is pretty lightweight in terms of deps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants