add tracing logs in server side and client side
This commit is contained in:
@@ -17,6 +17,7 @@ type (
|
||||
}
|
||||
|
||||
rpcServer struct {
|
||||
name string
|
||||
*baseRpcServer
|
||||
}
|
||||
)
|
||||
@@ -40,6 +41,7 @@ func NewRpcServer(address string, opts ...ServerOption) Server {
|
||||
}
|
||||
|
||||
func (s *rpcServer) SetName(name string) {
|
||||
s.name = name
|
||||
s.baseRpcServer.SetName(name)
|
||||
}
|
||||
|
||||
@@ -50,6 +52,7 @@ func (s *rpcServer) Start(register RegisterFn) error {
|
||||
}
|
||||
|
||||
unaryInterceptors := []grpc.UnaryServerInterceptor{
|
||||
serverinterceptors.UnaryTracingInterceptor(s.name),
|
||||
serverinterceptors.UnaryCrashInterceptor(),
|
||||
serverinterceptors.UnaryStatInterceptor(s.metrics),
|
||||
serverinterceptors.UnaryPromMetricInterceptor(),
|
||||
|
||||
Reference in New Issue
Block a user