Skip to content

Commit

Permalink
Merge pull request #10034 from gyuho/init-metrics-3.1
Browse files Browse the repository at this point in the history
etcdserver/api/v3rpc: display all registered gRPC metrics at start (v3.1)
  • Loading branch information
xiang90 authored Aug 25, 2018
2 parents 2c616b0 + e07fb41 commit 116c442
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions etcdserver/api/v3rpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (

"github.com/coreos/etcd/etcdserver"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"

"github.com/grpc-ecosystem/go-grpc-prometheus"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
Expand All @@ -45,5 +47,8 @@ func Server(s *etcdserver.EtcdServer, tls *tls.Config) *grpc.Server {
pb.RegisterAuthServer(grpcServer, NewAuthServer(s))
pb.RegisterMaintenanceServer(grpcServer, NewMaintenanceServer(s))

// to display all registered metrics with zero values
grpc_prometheus.Register(grpcServer)

return grpcServer
}

0 comments on commit 116c442

Please sign in to comment.