diff options
author | jramsay <jcai@gitlab.com> | 2020-01-23 23:25:13 +0300 |
---|---|---|
committer | jramsay <jcai@gitlab.com> | 2020-01-23 23:46:56 +0300 |
commit | d814eae1e6dfea4aa02acb739584918913536667 (patch) | |
tree | 6e5700df3578029db16efcf6fafc1188b0224f99 /internal | |
parent | a74fe57e74782d0bb306ba3d36a41ee25d43d324 (diff) |
Register praefect server for grpc prom metrics
Diffstat (limited to 'internal')
-rw-r--r-- | internal/config/prometheus/config.go | 2 | ||||
-rw-r--r-- | internal/praefect/server.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/internal/config/prometheus/config.go b/internal/config/prometheus/config.go index 31619f1a8..2c3199fca 100644 --- a/internal/config/prometheus/config.go +++ b/internal/config/prometheus/config.go @@ -18,7 +18,7 @@ func (c *Config) Configure() { return } - log.WithField("latencies", c.GRPCLatencyBuckets).Debug("grpc prometheus histograms enabled") + log.WithField("latencies", c.GRPCLatencyBuckets).Info("grpc prometheus histograms enabled") grpc_prometheus.EnableHandlingTimeHistogram(func(histogramOpts *prometheus.HistogramOpts) { histogramOpts.Buckets = c.GRPCLatencyBuckets diff --git a/internal/praefect/server.go b/internal/praefect/server.go index ce9e0d0e4..de23ceefe 100644 --- a/internal/praefect/server.go +++ b/internal/praefect/server.go @@ -119,6 +119,8 @@ func (srv *Server) RegisterServices() { gitalypb.RegisterServerServiceServer(srv.s, server.NewServer(srv.conf, srv.clientConnections)) healthpb.RegisterHealthServer(srv.s, health.NewServer()) + + grpc_prometheus.Register(srv.s) } // Shutdown will attempt a graceful shutdown of the grpc server. If unable |