diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-11-14 20:20:47 +0300 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-11-14 20:20:54 +0300 |
commit | 2b73b605d774a50f64440fc8433580c30b8f1554 (patch) | |
tree | 5b41a62faf5de145a91898577c9bc3b5f4406862 /internal | |
parent | 557cc726bd932d54f4d1340e52b81e4cf155cb48 (diff) |
Track gitaly-sidecar connections in prometheus
Diffstat (limited to 'internal')
-rw-r--r-- | internal/rubyserver/rubyserver.go | 3 |
1 files changed, 3 insertions, 0 deletions
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), } } |