Add tracing support to gRPC impls by sniffing HTTP/2 frames on underlying TCP socket #823
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 adds a new tracing capability -- to wrap a
net.Conn
that represents an HTTP/2 connection and examine all of the HTTP/2 traffic to assemble a trace. This is used to instrument a gRPC client and server to support tracing, since they include their own HTTP/2 implementation instead of usingnet/http
.The only testing I've done is to set breakpoints in an IDE to make sure the trace events were flowing. I'll probably add some very basic tests of the tracing (both the new HTTP/2 stuff and the existing
net/http
stuff) and push them to this PR, just so we have more comfort that this stuff doesn't stays functional and doesn't regress since it is admittedly pretty complicated and not otherwise covered by tests.This will resolve #817.