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

exporter/awsprometheusremotewriteexporter: close HTTP body after RoundTrip #2955

Conversation

odeke-em
Copy link
Member

Ensures that after an HTTP request roundtrip, that signingRoundTripper closes
the HTTP body. The contract for net/http.RoundTripper requires that
after invoking RoundTrip, that the body must be closed by the caller.

Fixes #2953

…dTrip

Ensures that after an HTTP request roundtrip, that signingRoundTripper closes
the HTTP body. The contract for net/http.RoundTripper requires that
after invoking RoundTrip, that the body must be closed by the caller.

Fixes #2953
@odeke-em odeke-em requested a review from a team March 31, 2021 23:38
@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #2955 (f740c77) into main (82bc6c3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2955   +/-   ##
=======================================
  Coverage   91.55%   91.55%           
=======================================
  Files         464      464           
  Lines       22860    22861    +1     
=======================================
+ Hits        20929    20930    +1     
  Misses       1438     1438           
  Partials      493      493           
Flag Coverage Δ
integration 68.96% <ø> (-0.07%) ⬇️
unit 90.52% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
exporter/awsprometheusremotewriteexporter/auth.go 86.66% <100.00%> (+0.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82bc6c3...f740c77. Read the comment docs.

@odeke-em
Copy link
Member Author

odeke-em commented Apr 2, 2021

/cc @bogdandrutu @tigrannajaryan.

@bogdandrutu bogdandrutu merged commit 4ee0063 into open-telemetry:main Apr 2, 2021
pmatyjasek-sumo pushed a commit to pmatyjasek-sumo/opentelemetry-collector-contrib that referenced this pull request Apr 28, 2021
…dTrip (open-telemetry#2955)

Ensures that after an HTTP request roundtrip, that signingRoundTripper closes
the HTTP body. The contract for net/http.RoundTripper requires that
after invoking RoundTrip, that the body must be closed by the caller.

Fixes open-telemetry#2953
punya pushed a commit to punya/opentelemetry-collector-contrib that referenced this pull request Jul 21, 2021
alexperez52 referenced this pull request in open-o11y/opentelemetry-collector-contrib Aug 18, 2021
@odeke-em odeke-em deleted the prometheus-remote-write-close-HTTP-body branch September 6, 2021 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exporter/awsprometheusremotewriteexporter: signingRoundTripper leaks and does not close http.Request body
4 participants