简体   繁体   中英

How to debug grpc calls between pods_

I have two pods interact with each other using grpc, how to debug grpc calls between those two pods?

I already try to set:

export GRPC_TRACE=all
export GRPC_VERBOSITY=DEBUG

then using kubectl logs <pod> -n namespces does not show up any grpc logs, how to debug grpc between pods?

It depends on what you want to debug: If you just want to know if there are communications on the Network, then you will have to add something outside of your 2 programs.

If you are the developer of these programs, you can add middlewares to the gRPC clients/servers to add trace (eg, using OpenTelemetry tracing and Jaeger) to get cross-services traces (you can propagate traces IDs on the network).

Otherwise, without knowing what your programs are we can't help you only with environment variables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM