talira

Go gRPC Middleware

Ready-made interceptors for gRPC Go: auth, logging, metrics, recovery and more

open sourceApache-2.0free

Go gRPC Middleware is a collection of interceptors for gRPC Go servers and clients that you chain together: auth, logging with adapters for slog, zap, zerolog, logrus and others, Prometheus metrics with exemplars, panic recovery, retries, timeouts, rate limiting, message validation from .proto options (including protovalidate) and a selector that applies interceptors only to matching methods.

Problems it solves

  • add logging and metrics to a Go gRPC server
  • recover from panics in gRPC handlers
  • authenticate gRPC requests in Go with an interceptor

Features

  • auth interceptor
  • logging with slog, zap, zerolog, logrus and go-kit adapters
  • Prometheus metrics with exemplars
  • panic recovery, retries, timeouts and rate limiting
  • proto-based message validation
  • selector to apply interceptors per method

Alternatives

The same job

These do what Go gRPC Middleware does.

  1. Kratos Go microservices framework for the cloud-native era
  2. go-zero A cloud-native Go microservices framework with a code generation CLI
  3. gRPC A high performance, open source universal RPC framework
  4. gRPC-Gateway protoc plugin that generates a REST/JSON reverse proxy for your gRPC services

Compare Go gRPC Middleware with the top 3