Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-11-14 20:20:47 +0300
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-11-14 20:20:54 +0300
commit2b73b605d774a50f64440fc8433580c30b8f1554 (patch)
tree5b41a62faf5de145a91898577c9bc3b5f4406862
parent557cc726bd932d54f4d1340e52b81e4cf155cb48 (diff)
Track gitaly-sidecar connections in prometheus
-rw-r--r--internal/rubyserver/rubyserver.go3
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),
}
}