feat(transport): Add a timeout#4252
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #4252 +/- ##
==========================================
- Coverage 79.54% 79.53% -0.01%
==========================================
Files 142 142
Lines 15905 15907 +2
Branches 2723 2723
==========================================
Hits 12652 12652
- Misses 2385 2389 +4
+ Partials 868 866 -2
|
|
You missed the second pool options implementation around lines 772 for HTTP2 I guess |
|
And just a side note - I don't know what are the Sentry SaaS response times but 5 seconds might be too little for the read timeout. I think other software uses 15 seconds by default. |
Contributor
Author
|
Gotcha, still working on this, not final yet -- planning on adding the timeout to the other transport and also need to decide on a good default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For some reason, we don't define any timeouts in our default transport(s).
With this change:
Backend SDKs in general set wildly different timeouts, from 30s in Go to <5s in Ruby or PHP. I went for the higher end of the range here since this is mainly meant to prevent the SDK preventing process shutdown like described in #4247 -- we don't want to cut off legitimate requests that are just taking a long time. (I was considering going even higher, maybe to 60s -- but I think 30s is a good first shot at this and we can always change it later.)