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:
authorJohn Cai <jcai@gitlab.com>2020-02-14 22:41:21 +0300
committerJohn Cai <jcai@gitlab.com>2020-02-29 03:48:15 +0300
commitd2ab5206275c398ec26fe39a2326dc78382a1297 (patch)
treec1ed5594c625e55632cf085b6fd4e95bbdb6188f
parent1c454ac47f4d96e5d2abed01145af5ac26912c4f (diff)
Add method type metric middleware in praefectjc-add-method-type-metrics
-rw-r--r--changelogs/unreleased/jc-add-method-type-metrics.yml5
-rw-r--r--internal/praefect/server.go2
2 files changed, 7 insertions, 0 deletions
diff --git a/changelogs/unreleased/jc-add-method-type-metrics.yml b/changelogs/unreleased/jc-add-method-type-metrics.yml
new file mode 100644
index 000000000..630ac6dd5
--- /dev/null
+++ b/changelogs/unreleased/jc-add-method-type-metrics.yml
@@ -0,0 +1,5 @@
+---
+title: Add method type metrics
+merge_request: 1878
+author:
+type: added
diff --git a/internal/praefect/server.go b/internal/praefect/server.go
index 76473adf5..4d95ce0bf 100644
--- a/internal/praefect/server.go
+++ b/internal/praefect/server.go
@@ -77,6 +77,7 @@ func NewServer(director proxy.StreamDirector, l *logrus.Entry, r *protoregistry.
cancelhandler.Stream, // Should be below LogHandler
grpctracing.StreamServerTracingInterceptor(),
auth.StreamServerInterceptor(conf.Auth),
+ middleware.MethodTypeStreamInterceptor(r),
// Panic handler should remain last so that application panics will be
// converted to errors and logged
panichandler.StreamPanicHandler,
@@ -92,6 +93,7 @@ func NewServer(director proxy.StreamDirector, l *logrus.Entry, r *protoregistry.
cancelhandler.Unary, // Should be below LogHandler
grpctracing.UnaryServerTracingInterceptor(),
auth.UnaryServerInterceptor(conf.Auth),
+ middleware.MethodTypeUnaryInterceptor(r),
// Panic handler should remain last so that application panics will be
// converted to errors and logged
panichandler.UnaryPanicHandler,