From 2b73b605d774a50f64440fc8433580c30b8f1554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20=22BKC=22=20Carlb=C3=A4cker?= Date: Tue, 14 Nov 2017 18:20:47 +0100 Subject: Track gitaly-sidecar connections in prometheus --- internal/rubyserver/rubyserver.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/rubyserver') diff --git a/internal/rubyserver/rubyserver.go b/internal/rubyserver/rubyserver.go index 3615ddeeb..b719de6e8 100644 --- a/internal/rubyserver/rubyserver.go +++ b/internal/rubyserver/rubyserver.go @@ -18,6 +18,7 @@ import ( pb "gitlab.com/gitlab-org/gitaly-proto/go" + "github.com/grpc-ecosystem/go-grpc-prometheus" log "github.com/sirupsen/logrus" "golang.org/x/net/context" "google.golang.org/grpc" @@ -191,5 +192,7 @@ func dialOptions() []grpc.DialOption { grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { return net.DialTimeout("unix", addr, timeout) }), + grpc.WithUnaryInterceptor(grpc_prometheus.UnaryClientInterceptor), + grpc.WithStreamInterceptor(grpc_prometheus.StreamClientInterceptor), } } -- cgit v1.2.3