-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net/http2: log encoded hpack field header when GODEBUG=http2debug is set #46339
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
Comments
CC @tombergan @bradfitz via https://dev.golang.org/owners Also CC @neild, maybe? |
This is kind of like a feature request? Correct me if I'm wrong @KeiichiHirobe, but you're asking for different behavior of a |
Yes!
Yes! |
@fraenkel is the go-to guy for HTTP2 matters. |
I am a bit confused, we already log the outbound headers.
|
Sorry for the late reply, and I was mistaken. grpc-go logs decoded hpack field through net/http2/frame.go, but never logs encoded hpack field at https://github.com/grpc/grpc-go/blob/4faa31f0a5809a5064ee128c9d855c0bedc1c783/internal/transport/controlbuf.go#L682. Anyway, this is not a issue for golang/go, So I close this issue. |
In HTTP/2, header received is logged like this:
But, header sended is logged like this:
I'd like to suggest to log hpack field header field not only when decode but also when encode because it is very helpful for debug.
As far as I read code,
Decode log here:
https://github.com/golang/net/blob/fe42d452be8f3a2de6a60623c315a49bd37f0a9a/http2/frame.go#L1497-L1499
To add logging when encode too, maybe we should add logging around here:
https://github.com/golang/net/blob/fe42d452be8f3a2de6a60623c315a49bd37f0a9a/http2/hpack/encode.go#L81
But, we don't have a reference to framer there.
I don't have a good solution for that.
The text was updated successfully, but these errors were encountered: