-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Log HTTP Request and Response Trailers #31840
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
@Tratcher @halter73 @davidfowl The trick here will be logging them when they are all available and before they disappear. This will be especially true with response trailers. With them you'll need to wait until the response body has finished writing (someone could add a trailer at any time while the response is writing) but before the response ends. |
Logging the response trailers as the middleware exits should be adequate, it will capture trailers added by anything after it. That does leave a window between this middleware and the start of the pipeline where someone else could add trailers, but that seems like a tradeoff people would be able to understand. In theory you could have the same problem with response headers when there's no body. Request trailers could be logged when the end of the request body is read (we'll be wrapping the body so we'll know), or when the middleware exits. |
Thanks for contacting us. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
gRPC would be the main scenario. @JamesNK? |
gRPC uses response trailers. Important information - grpc-status (i.e. did the RPC succeed) - is sent via trailers. |
|
Done. |
As a follow up to #31816, we should log Http Request and Response trailers if available.
I see a few potential issues:
The text was updated successfully, but these errors were encountered: