-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add Trailer to client-side stats.End #2639
Conversation
Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement. After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.
Regards, |
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.
This LGTM but you need to make sure to make the CLA bot happy. Thanks!
I added my google.com account and the CLA should now be good. Please retry CLA verification. |
@mklencke that doesn't seem to have worked. Is the email address on your commit your @google.com email address? |
Currently, it is not possible to access trailers from within a stats.Handler. The reason is that both stats.Handler and ClientStream.Trailer require a lock on the ClientStream. A workaround would be to start a separate goroutine that will call ClientStream.Trailer asynchronously, but that requires careful coordination and we can quite easily make the trailer metadata available to the stats.Handler directly. Use case: an interceptor that processes trailer metadata for each streaming RPC after the stream has finished. Note that a StreamClientInterceptor returns immediately, before the stream has finished and before the trailer metadata is available.
Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement. After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.
Regards, |
That looks like a better error than the first one. I'm not sure it's required for Google employees to sign the CLA directly, but that is what we did on the gRPC team and it made everything work. So if you can't find some other way to take care of it, it's probably best to go through the process directly (it's pretty quick: click the link above, sign up as an employee, sign in with google using your corp account, link your github account, agree to the CLA, then drop a comment here to wake the bot up). |
bot, please retry :) |
I signed it |
Currently, it is not possible to access trailers from within a
stats.Handler. The reason is that both stats.Handler and
ClientStream.Trailer require a lock on the ClientStream.
A workaround would be to start a separate goroutine that will call
ClientStream.Trailer asynchronously, but that requires careful
coordination and we can quite easily make the trailer metadata available
to the stats.Handler directly.
Use case: an interceptor that processes trailer metadata for each
streaming RPC after the stream has finished. Note that a
StreamClientInterceptor returns immediately, before the stream has
finished and before the trailer metadata is available.