in ddm-notification-service-core/src/main/java/com/epam/digital/data/platform/notification/core/audit/AbstractNotificationAuditFacade.java [63:85]
private void sendNotificationAudit(EventType eventType, String action, String step,
AuditResultDto result, Channel channel, T notificationDto) {
var event = createBaseAuditEvent(
eventType, action, MDC.get(MDC_TRACE_ID_HEADER));
var notification = notificationAuditDto(notificationDto, channel);
var delivery = DeliveryAuditDto.builder()
.failureReason(result.getFailureReason())
.status(result.getStatus())
.channel(channel)
.build();
var context = auditService.createContext(action, step, null, null, null, result.getStatus());
context.put("notification", notification);
context.put("delivery", delivery);
event.setContext(context);
event.setSourceInfo(Objects.nonNull(notificationDto) ?
toAuditSourceDto(notificationDto.getContext()) : null);
auditService.sendAudit(event.build());
}