def METHOD_NAME(self, request, project_id: str, cluster_id: str, namespace: str, pod: str):
    """获取实时日志session"""
    data = self.params_validate(serializers.GetLogSessionSLZ)
    filter = LogFilter(
        container_name=data["container_name"],
        since_time=data["since_time"],
        tail_lines=data["tail_lines"],
    )
    ctx = {
        'username': request.user.username,
        'access_token': request.user.token.access_token,
        'filter': filter,
        'project_id': project_id,
        'cluster_id': cluster_id,
    }
    session = session_mgr.create(project_id, cluster_id)
    session_id = session.set(ctx)
    stream_url = (
        f'/ws/logs/projects/{project_id}/clusters/{cluster_id}/namespaces/{namespace}/pods/{pod}/stdlogs/stream/'
    )
    ws_url = utils.make_ws_url(stream_url, session_id)
    result = {"session_id": session_id, "ws_url": ws_url}
    return Response(result)