debugging/

directory
v0.0.0-...-8ae4b7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2025 License: Apache-2.0

README

Debugging

Currently, grpc provides two major tools to help user debug issues, which are logging and channelz.

Logs

gRPC has put substantial logging instruments on critical paths of gRPC to help users debug issues. The Log Levels doc describes what each log level means in the gRPC context.

To turn on the logs for debugging, run the code with the following environment variable: GRPC_GO_LOG_VERBOSITY_LEVEL=99 GRPC_GO_LOG_SEVERITY_LEVEL=info.

Channelz

We also provide a runtime debugging tool, Channelz, to help users with live debugging.

See the channelz blog post here (link) for details about how to use channelz service to debug live program.

Try it

The example is able to showcase how logging and channelz can help with debugging. See the channelz blog post linked above for full explanation.

go run server/main.go
go run client/main.go

Directories

Path Synopsis
Binary client demonstrates how to use logging and Channelz for debugging gRPC operations.
Binary client demonstrates how to use logging and Channelz for debugging gRPC operations.
Binary server demonstrates how to enable logging and Channelz for debugging gRPC services.
Binary server demonstrates how to enable logging and Channelz for debugging gRPC services.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL