diff --git a/server/grpc/server.go b/server/grpc/server.go index b21d9afa629c..5ee0b8037bf4 100644 --- a/server/grpc/server.go +++ b/server/grpc/server.go @@ -5,6 +5,7 @@ import ( "net" "time" + "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "google.golang.org/grpc" "github.com/cosmos/cosmos-sdk/client" @@ -33,6 +34,7 @@ func StartGRPCServer(clientCtx client.Context, app types.Application, cfg config grpc.ForceServerCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), grpc.MaxSendMsgSize(maxSendMsgSize), grpc.MaxRecvMsgSize(maxRecvMsgSize), + grpc.StatsHandler(otelgrpc.NewServerHandler()), ) app.RegisterGRPCServer(grpcSrv, cfg.LogQueries)