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

otelhttp: nil check wrappedBody.Close #2164

Merged

Conversation

adamdecaf
Copy link
Contributor

We're experimenting with open-telemetry and ran into a panic where *wrappedBody.Close() can panic. This seems to be code from 2+ years ago, so I'm surprised we ran into it.

I'm happy to sign the CLA if this change will be accepted.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 6, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: adamdecaf / name: Adam Shannon (75693e7)

Copy link
Member

@Aneurysm9 Aneurysm9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a CHANGELOG entry noting this fix? Thanks!

@adamdecaf adamdecaf force-pushed the nil-check-otelhttp-wrappedBody branch from 75693e7 to 78437aa Compare April 6, 2022 18:07
@adamdecaf
Copy link
Contributor Author

@Aneurysm9 added, thanks!

@codecov
Copy link

codecov bot commented Apr 6, 2022

Codecov Report

Merging #2164 (c30f5a2) into main (1e34aa3) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2164   +/-   ##
=====================================
  Coverage   69.3%   69.4%           
=====================================
  Files        135     135           
  Lines       6111    6114    +3     
=====================================
+ Hits        4241    4244    +3     
  Misses      1742    1742           
  Partials     128     128           
Impacted Files Coverage Δ
instrumentation/net/http/otelhttp/transport.go 94.7% <100.0%> (+0.1%) ⬆️

@adamdecaf
Copy link
Contributor Author

adamdecaf commented Apr 6, 2022

I got a notification about an error with the GRPC instrument, but that's not part of my changes. This is what panic'd

func TestStreamClientInterceptorOnBIDIStream(t *testing.T) {

CHANGELOG.md Outdated Show resolved Hide resolved
@adamdecaf adamdecaf force-pushed the nil-check-otelhttp-wrappedBody branch from 78437aa to 60d9ca2 Compare April 7, 2022 13:12
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@MrAlias MrAlias merged commit 20f04ef into open-telemetry:main Apr 7, 2022
@adamdecaf adamdecaf deleted the nil-check-otelhttp-wrappedBody branch April 8, 2022 13:59
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.

None yet

5 participants