Skip to content
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

grpc-dump doesn't show error/status details #90

Open
shinderuk opened this issue Mar 31, 2020 · 0 comments
Open

grpc-dump doesn't show error/status details #90

shinderuk opened this issue Mar 31, 2020 · 0 comments
Assignees

Comments

@shinderuk
Copy link

This can be demonstrated with the grpc-go sample code.

  1. Start the sample server
$ go run ./server
  1. Copy helloworld.proto to proto/helloworld/helloworld.proto
  2. Start grpc-dump
$ ~/go/bin/grpc-dump -port 8980 -destination localhost:50052 -proto_roots proto
...
  1. Run the sample client twice:
$ go run ./client --addr localhost:8980
2020/04/01 00:10:48 Greeting: Hello world
$ go run ./client --addr localhost:8980
2020/04/01 00:10:50 Quota failure: violations:<subject:"name:world" description:"Limit one greeting per person" > 
exit status 1
  1. Inspect grpc-dump output:
{"service":"helloworld.Greeter","method":"SayHello","messages":[{"message_origin":"client","raw_message":"CgV3b3JsZA==","message":{"name":"world"},"timestamp":"2020-04-01T00:10:48.645753+03:00"},{"message_origin":"server","raw_message":"CgtIZWxsbyB3b3JsZA==","message":{"message":"Hello world"},"timestamp":"2020-04-01T00:10:48.646446+03:00"}],"metadata":{":authority":["localhost:8980"],"content-type":["application/grpc"],"user-agent":["grpc-go/1.29.0-dev"],"via":["HTTP/2.0 127.0.0.1:8980"]},"metadata_response_headers":{"content-type":["application/grpc"]},"metadata_response_trailers":{}}
{"service":"helloworld.Greeter","method":"SayHello","messages":[{"message_origin":"client","raw_message":"CgV3b3JsZA==","message":{"name":"world"},"timestamp":"2020-04-01T00:10:50.002394+03:00"}],"error":{"code":"ResourceExhausted","message":"Request limit exceeded."},"metadata":{":authority":["localhost:8980"],"content-type":["application/grpc"],"user-agent":["grpc-go/1.29.0-dev"],"via":["HTTP/2.0 127.0.0.1:8980"]},"metadata_response_headers":null,"metadata_response_trailers":{"content-type":["application/grpc"]}}

There are no error details:

{"code":"ResourceExhausted","message":"Request limit exceeded."}

I think, It would be better to add a raw grpc-status-details-bin trailer to the output, at least for replay and debugging.

@bradleyjkemp bradleyjkemp self-assigned this Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants