diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index ae31af027..33d302802 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -39,6 +39,10 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e func (s *authServer) UserToken(ctx context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) { log.Info("", "rpc come UserToken") + operationID, ok := ctx.Value(constant.OperationID).(string) + if !ok { + log.Error("2222", "ctx missing operationID", operationID) + } resp := pbAuth.UserTokenResp{} if _, err := s.userCheck.GetUserInfo(ctx, req.UserID); err != nil { log.Info("", "UserToken err:", err.Error()) diff --git a/pkg/common/mw/rpc.go b/pkg/common/mw/rpc.go index 1ee9c8aa3..fb5a2e295 100644 --- a/pkg/common/mw/rpc.go +++ b/pkg/common/mw/rpc.go @@ -58,6 +58,7 @@ func rpcClientInterceptor(ctx context.Context, method string, req, reply interfa } operationID, ok := ctx.Value(constant.OperationID).(string) if !ok { + log.Error("1111", "ctx missing operationID") return errs.ErrArgs.Wrap("ctx missing operationID") } md := metadata.Pairs(constant.OperationID, operationID)