Using gRPC-Go is certainly a good way to build resilient, performant and scalable distributed systems. What I don't quite get is how to actually debug services written with it. Also, is HTTP/2 the only wire protocol supported?
Asked
Active
Viewed 3,127 times
5
-
2You can debug by setting the `GRPC_TRACE` environment variable to `all`. As for HTTP/2 I think it is due to security and reliability concerns. I could be wrong though – RisingSun Nov 28 '16 at 08:14
-
Thanks @khuderm … so, is there an alternative write protocol available then? – Michael Hausenblas Nov 28 '16 at 08:20
-
1Sorry I meant there isn't one but I am not 100% sure – RisingSun Nov 28 '16 at 08:23
-
2https://github.com/grpc/grpc-go/blob/master/transport/transport.go#L393 the library appears to be hardcoded to only use HTTP/2 – Frederik Deweerdt Nov 28 '16 at 18:55
1 Answers
2
Not sure if you've found a solution yet...but depending on how many services you have in your Application, you can use a distributed tracing system to record calls between services. Some of these systems include:
- Zipkin (http://zipkin.io/)
- Dapper (https://research.google.com/pubs/pub36356.html)
- Jaeger (https://uber.github.io/jaeger/)
If you use the opentracing project (http://opentracing.io/), you can abstract your tracing code in your client and server from the code that transmits information to the Tracing System. For example, you can instrument your client and servers with Trace statements from OpenTracing, and then you can switch out your trace implementation for a Zipkin or Jaeger Tracer that pushes traces in the correct format.
There are opentracing bindings for gRPC reay to use. https://github.com/grpc-ecosystem/grpc-opentracing

RyanD
- 253
- 1
- 7