diff --git a/go/vt/servenv/grpc_server.go b/go/vt/servenv/grpc_server.go index 96fe3c25ea9..c175db7b28b 100644 --- a/go/vt/servenv/grpc_server.go +++ b/go/vt/servenv/grpc_server.go @@ -273,15 +273,16 @@ func interceptors() []grpc.ServerOption { } func serveGRPC() { - if grpccommon.EnableGRPCPrometheus() { - grpc_prometheus.Register(GRPCServer) - grpc_prometheus.EnableHandlingTimeHistogram() - } // skip if not registered if gRPCPort == 0 { return } + if grpccommon.EnableGRPCPrometheus { + grpc_prometheus.Register(GRPCServer) + grpc_prometheus.EnableHandlingTimeHistogram() + } + // register reflection to support list calls :) reflection.Register(GRPCServer)