Use http.NewRequestWithContext for outgoing HTTP requests#3711
Merged
milosgajdos merged 1 commit intodistribution:mainfrom Aug 16, 2022
Merged
Use http.NewRequestWithContext for outgoing HTTP requests#3711milosgajdos merged 1 commit intodistribution:mainfrom
milosgajdos merged 1 commit intodistribution:mainfrom
Conversation
This simple change mainly affects the distribution client. By respecting the context the caller passes in, timeouts and cancellations will work as expected. Also, transports which rely on the context (such as tracing transports that retrieve a span from the context) will work properly. Signed-off-by: Aaron Lehmann <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #3711 +/- ##
==========================================
- Coverage 57.39% 57.38% -0.02%
==========================================
Files 105 105
Lines 10835 10839 +4
==========================================
+ Hits 6219 6220 +1
- Misses 3932 3934 +2
- Partials 684 685 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
milosgajdos
approved these changes
Aug 11, 2022
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.
This simple change mainly affects the distribution client. By respecting
the context the caller passes in, timeouts and cancellations will work
as expected. Also, transports which rely on the context (such as tracing
transports that retrieve a span from the context) will work properly.