-
Notifications
You must be signed in to change notification settings - Fork 5
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
lib: add tracing support for http2 #266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have much context to review this in-depth, but it seems very well-tested. Just left a couple of questions, code LGTM.
@@ -199,6 +199,9 @@ const onServerStreamErrorChannel = dc.channel('http2.server.stream.error'); | |||
const onServerStreamFinishChannel = dc.channel('http2.server.stream.finish'); | |||
const onServerStreamCloseChannel = dc.channel('http2.server.stream.close'); | |||
|
|||
const clientTracingChannels = dc.tracingChannel('http2.client'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const clientTracingChannels = dc.tracingChannel('http2.client'); | |
const clientTracingChannels = dc.tracingChannel('http2.client'); |
Should we have a http2.server.session too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but at the moment I'm only tracking streams (http transactions). We could of course add support for sessions (to track actual connections). We can add those later on. At least this way we have the same support as we have for http and fetch.
if (headers[HTTP2_HEADER_METHOD] === HTTP2_METHOD_HEAD) { | ||
// For head requests, there must not be a body... | ||
// end the writable side immediately. | ||
stream.end(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be inside an else if
instead? What if we receive an endOfStream
= true and HTTP2_HEADER_METHOD = head?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, to be honest I've just kept the same logic it was implemented before.
8b7b524
to
52285f6
Compare
c554ce0
to
abbaab0
Compare
abbaab0
to
c392d14
Compare
c392d14
to
6e50225
Compare
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
Landed in 65430e7...ed8c4f9 |
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> PR-URL: #268
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> PR-URL: #268
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> PR-URL: #269
PR-URL: #266 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> PR-URL: #269
While also adding tracing channels to track http2 client and server streams lifetime.