Skip to content

Commit 730d139

Browse files
authored
Merge pull request #21325 from fuweid/reorder-newStreamInterceptor
server/etcdserver/api/v3rpc: run metrics interceptors before handlers
2 parents 374dd80 + 0c68e48 commit 730d139

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/etcdserver/api/v3rpc/grpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ func Server(s *etcdserver.EtcdServer, tls *tls.Config, interceptor grpc.UnarySer
5252

5353
chainUnaryInterceptors := []grpc.UnaryServerInterceptor{
5454
newLogUnaryInterceptor(s),
55-
newUnaryInterceptor(s),
5655
serverMetrics.UnaryServerInterceptor(),
56+
newUnaryInterceptor(s),
5757
}
5858
if interceptor != nil {
5959
chainUnaryInterceptors = append(chainUnaryInterceptors, interceptor)
6060
}
6161

6262
chainStreamInterceptors := []grpc.StreamServerInterceptor{
63-
newStreamInterceptor(s),
6463
serverMetrics.StreamServerInterceptor(),
64+
newStreamInterceptor(s),
6565
}
6666

6767
if s.Cfg.EnableDistributedTracing {

0 commit comments

Comments
 (0)