refactor: simplify zrpc stat config (#3107)
This commit is contained in:
@@ -113,11 +113,8 @@ func (s *rpcServer) buildUnaryInterceptors() []grpc.UnaryServerInterceptor {
|
||||
interceptors = append(interceptors, serverinterceptors.UnaryRecoverInterceptor)
|
||||
}
|
||||
if s.middlewares.Stat {
|
||||
interceptors = append(interceptors, serverinterceptors.UnaryStatInterceptor(s.metrics,
|
||||
serverinterceptors.StatConf{
|
||||
SlowThreshold: s.middlewares.StatSlowThreshold,
|
||||
NotLoggingContentMethods: s.middlewares.NotLoggingContentMethods,
|
||||
}))
|
||||
interceptors = append(interceptors,
|
||||
serverinterceptors.UnaryStatInterceptor(s.metrics, s.middlewares.StatConf))
|
||||
}
|
||||
if s.middlewares.Prometheus {
|
||||
interceptors = append(interceptors, serverinterceptors.UnaryPrometheusInterceptor)
|
||||
|
||||
Reference in New Issue
Block a user