Registry / observability / grpc-ecosystem-go-grpc-prometheus

grpc-ecosystem-go-grpc-prometheus

JSON →
library1.2.0gogounverified

A Go library providing Prometheus monitoring for gRPC servers and clients.

go get github.com/grpc-ecosystem/go-grpc-prometheus
INSTALL
IMPORT
SIG · GRPC-ECOSYSTEM-GO-
G
grpc-ecosystem-go-grpc-prometheus
observabilitygov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

grpc_prometheus
✓ github.com/grpc-ecosystem/go-grpc-prometheus

Set up a gRPC server with Prometheus monitoring interceptors.

package main import ( "net" "google.golang.org/grpc" "github.com/grpc-ecosystem/go-grpc-prometheus" ) func main() { s := grpc.NewServer( grpc.StreamInterceptor(grpc_prometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpc_prometheus.UnaryServerInterceptor), ) lis, _ := net.Listen("tcp", ":50051") s.Serve(lis) }
Debug
Known issues
gotchaRequires Prometheus client library to be registered; metrics are not automatically exposed.
fix
Register the default metrics with prometheus.MustRegister(grpc_prometheus.DefaultServerMetrics).
affects: all
Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
2
Resources
grpc-ecosystem-go-grpc-prometheus — go get grpc-ecosystem-go-grpc-prometheus · libregistry