private void sendNotificationAudit()

in ddm-notification-service/src/main/java/com/epam/digital/data/platform/notification/audit/UserNotificationAuditFacade.java [51:68]


  private void sendNotificationAudit(EventType eventType, String action, String step,
      AuditResultDto result, Channel channel, UserNotificationMessageDto notificationDto) {
    var event = createBaseAuditEvent(
        eventType, action, MDC.get(MDC_TRACE_ID_HEADER));
    var context = auditService.createContext(action, step, null, null, null, result.getStatus());
    context.put("notification", notificationDto);
    context.put("delivery", DeliveryAuditDto.builder()
        .failureReason(result.getFailureReason())
        .status(result.getStatus())
        .channel(channel)
        .build());
    event.setContext(context);

    event.setSourceInfo(Objects.nonNull(notificationDto) ?
        toAuditSourceDto(notificationDto.getContext()) : null);

    auditService.sendAudit(event.build());
  }