def METHOD_NAME(
    self,
    client_func: Callable,
    operate_str: str,
    project_id: str,
    activity_type: ActivityType,
    namespace: str,
    name: str,
    manifest: Dict = None,
    log_success: bool = False,
) -> Dict:
    """
    执行单个 ServiceMonitor 操作类的通用处理逻辑
    :param client_func: k8s client 方法
    :param operate_str: 操作描述，可选值为：创建，更新，删除
    :param project_id: 项目 ID
    :param activity_type: 操作类型
    :param namespace: 命名空间
    :param name: ServiceMonitor 名称
    :param manifest: 完整配置信息（创建用），若为 None 则非创建逻辑
    :param log_success: 操作成功时记录日志
    :return:
    """
    username = self.request.user.username
    result = (
        client_func(namespace, manifest) if activity_type == ActivityType.Add else client_func(namespace, name)
    )
    if result.get('status') == 'Failure':
        message = _('{} Metrics [{}/{}] 失败: {}').format(operate_str, namespace, name, result.get('message', ''))
        self._activity_log(project_id, username, name, message, activity_type, ActivityStatus.Failed)
        raise error_codes.APIError(result.get('message', ''))
    # 仅当指定需要记录 成功信息 才记录
    if log_success:
        message = _('{} Metrics [{}/{}] 成功').format(operate_str, namespace, name)
        self._activity_log(project_id, username, name, message, activity_type, ActivityStatus.Succeed)
    return result