https://github.com/jille/rpcz
A library to show RPC samples for gRPC
https://github.com/jille/rpcz
debugging distributed-systems golang grpc grpc-go
Last synced: 26 days ago
JSON representation
A library to show RPC samples for gRPC
- Host: GitHub
- URL: https://github.com/jille/rpcz
- Owner: Jille
- License: bsd-2-clause
- Created: 2022-01-24T15:57:56.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-06-02T08:37:09.000Z (10 months ago)
- Last Synced: 2025-06-02T19:43:51.516Z (10 months ago)
- Topics: debugging, distributed-systems, golang, grpc, grpc-go
- Language: Go
- Homepage:
- Size: 82 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rpcz
[](https://godoc.org/github.com/Jille/rpcz)
This library shows recent gRPC calls on a web page including their payloads for debugging.
You need to register interceptors for every gRPC client and server that you want to debug.
```go
// Servers
s := grpc.NewServer(grpc.ChainUnaryInterceptor(UnaryServerInterceptor), grpc.ChainStreamInterceptor(StreamServerInterceptor))
// Clients
c, err := grpc.Dial(addr, grpc.WithUnaryInterceptor(rpcz.UnaryClientInterceptor), grpc.WithStreamInterceptor(rpcz.StreamClientInterceptor))
// Expose the debugging page. Make sure to protect it appropriately, as it exposes all RPC payloads.
http.Handle("/rpcz", httpauth.SimpleBasicAuth("debugger", "hackme")(rpcz.Handler))
```
Allow me to reiterate: It is very important to protect the rpcz.Handler against unprivileged access if you don't want a data leak.
## Screenshot