# go-grpc-middleware

Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.

Repository: https://github.com/grpc-ecosystem/go-grpc-middleware
Canonical: https://ross.abutalabs.com/products/go-grpc-middleware
Language: Go
License: Apache-2.0
License Family: permissive
Topics: grpc, golang, middleware, generic-functions, library, logging, authentication, retries, testing, interceptor
Last push: 2026-08-21T15:56:39+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 43, longevity 100
- inputs: {"age_days": 3763, "days_push": 12, "days_rel": 302, "gap_med": 57, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6762, forks 746 (observed 2026-08-28T04:09:48.386529+00:00)

## What it is
A Go library of gRPC middleware (interceptors) providing chained, ready-to-use implementations for auth, logging, tracing, metrics, retries, recovery, and more. It is the official grpc-ecosystem collection for building consistent cross-cutting concerns across gRPC servers and clients.

## Use cases
- chain grpc interceptors in go
- add authentication to grpc server
- add logging and tracing to grpc services
- grpc retry and rate limiting middleware
- add prometheus metrics to grpc
- recover from panics in grpc handlers
- build consistent observability across microservices

## When to choose
- you build gRPC services in Go and need standard cross-cutting middleware
- you want consistent logging, tracing, and metrics instrumentation across multiple microservices
- you need chained interceptors for auth, retries, and panic recovery

## When to avoid
- you use a non-Go language (see language-specific gRPC middleware instead)
- your framework is HTTP/REST rather than gRPC
- you need highly custom interceptor behavior beyond what the provided middlewares offer

## Facets
- artifact type: library
- maturity: active
- function: middleware, logging, auth, tracing, monitoring, rate-limiting, rpc, testing
- domain: developer-tools, backend, microservices, apis, monitoring
- platform: go, windows, cross-platform
- tags: grpc, interceptors, observability, retries, panic-recovery, opentelemetry, linux, macos

## Member repositories
- grpc-ecosystem/go-grpc-middleware (main) score 79
- grpc-ecosystem/go-grpc-prometheus (plugin) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:48.386529+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:42:33.773832+00:00, confidence not recorded.
  - readme: https://github.com/grpc-ecosystem/go-grpc-middleware (fetched 2026-08-28T04:09:48.386529+00:00, sha da35f62449df)
- Data as of 2026-08-30T08:39:29.467469+00:00.
