Documentation
¶
Overview ¶
Package grpc provides gRPC instrumentation for metry: server and client stats handlers that create spans and propagate trace context. Use after metry.Init.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientDialOption ¶
func ClientDialOption() grpc.DialOption
ClientDialOption returns a gRPC DialOption that installs the OTel stats handler for the client. Use with grpc.NewClient(addr, metrygrpc.ClientDialOption(), ...).
func ClientStatsHandler ¶
ClientStatsHandler returns a gRPC stats.Handler for client-side tracing and propagation. Use with grpc.NewClient(addr, grpc.WithStatsHandler(metrygrpc.ClientStatsHandler()), ...). Covers both unary and streaming RPCs.
func ServerOptions ¶
func ServerOptions() []grpc.ServerOption
ServerOptions returns gRPC server options that install the OTel stats handler. Use with grpc.NewServer(metrygrpc.ServerOptions()...).
func ServerStatsHandler ¶
ServerStatsHandler returns a gRPC stats.Handler for server-side tracing and metrics. Use with grpc.NewServer(grpc.StatsHandler(metrygrpc.ServerStatsHandler())). Covers both unary and streaming RPCs.
Types ¶
This section is empty.