Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

ochttp plugin: makes Body a transparent wrapper#1069

Merged
rghetia merged 1 commit intocensus-instrumentation:masterfrom
GreenHorse:transparent-body
Mar 19, 2019
Merged

ochttp plugin: makes Body a transparent wrapper#1069
rghetia merged 1 commit intocensus-instrumentation:masterfrom
GreenHorse:transparent-body

Conversation

@GreenHorse
Copy link
Copy Markdown
Contributor

With Go 1.12 the body of http.Response can implement io.Writer.
https://tip.golang.org/pkg/net/http/#Response.Body

Upgrading to websocket for example will result with a body implementing io.Writer.
https://golang.org/src/net/http/httputil/reverseproxy.go#L521

I followed the logic of wrappedResponseWriter, it might be overkill as Response.Body has only one optional interface for now.

Both ochttp.tracker and ochttp.bodyTracker are affected.

@GreenHorse GreenHorse requested review from a team, rakyll and rghetia as code owners March 18, 2019 12:48
@rghetia
Copy link
Copy Markdown
Contributor

rghetia commented Mar 18, 2019

LGTM.
@GreenHorse can you please close and reopen so that appveyor build gets triggered again?

@GreenHorse GreenHorse closed this Mar 18, 2019
@GreenHorse GreenHorse reopened this Mar 18, 2019
@GreenHorse GreenHorse closed this Mar 19, 2019
@GreenHorse GreenHorse reopened this Mar 19, 2019
@GreenHorse
Copy link
Copy Markdown
Contributor Author

@rghetia checks have passed

@rghetia rghetia merged commit 6ddd4bc into census-instrumentation:master Mar 19, 2019
songy23 pushed a commit that referenced this pull request Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants