-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Is there any place proper to log the grpc or http error info? #887
Comments
The middleware probably gets applied in the wrong order which is a bug. The only workaround for now would be for you to write to your own timeout middleware (perhaps use tower's) and apply it after TraceLayer. Adding this to the 0.7 milestone but I don't it'll require breaking changes to fix. |
And use the tower timeout , however, we as client got transport error, though tracelayer on-failure can correctly classifiy as the request timed out error . So we need fix the tower timeout middleware or add a tower-http timeout middleware to support return time expired errror message. And deprecate the tonic::Server timeout method. |
Just move the tonic::transport::Service::timeout code to tower-http. Now run ok .
Retest on the master of tonic now, preview on 0.6.2: Error is 'tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: Reset(StreamId(1), INTERNAL_ERROR, Remote) }))', try_from_error process result: cannot not parse as grpc error, cannot parse as h2 error, can not parse by the source chain, then return the Error above. |
Bug Report
Just use tower-http trace's new_for_grpc.
And do server timeout test : client pass grpc-timeout 1H, and server build with timeout 1ms, here use tonic::server::timeout, not tower timeout.
Then no any log in the server tonic , even enable the tower-http trace and trace level.
Can hack the tonic service to log the time expired error.
But how can get the error info log by the middleware or get current rpc status from my service code?
Version
0.6.2
Platform
Crates
Description
The text was updated successfully, but these errors were encountered: