feat(auditlog): NotifyDeliver rows carry the originating ParentExecutionId
This commit is contained in:
@@ -492,7 +492,8 @@ public class NotificationOutboxActor : ReceiveActor, IWithTimers
|
||||
/// <see cref="AuditEvent.ExecutionId"/> is copied straight from
|
||||
/// <see cref="Notification.OriginExecutionId"/> so the dispatcher's
|
||||
/// <c>NotifyDeliver</c> rows carry the same per-run id as the site's
|
||||
/// <c>NotifySend</c> row (Audit Log #23).
|
||||
/// <c>NotifySend</c> row (Audit Log #23); <see cref="AuditEvent.ParentExecutionId"/>
|
||||
/// is likewise copied from <see cref="Notification.OriginParentExecutionId"/>.
|
||||
/// </summary>
|
||||
private static AuditEvent BuildNotifyDeliverEvent(
|
||||
Notification notification,
|
||||
@@ -525,6 +526,11 @@ public class NotificationOutboxActor : ReceiveActor, IWithTimers
|
||||
// rows to the site-emitted NotifySend row for the same run. Null when
|
||||
// the notification was raised outside a script execution.
|
||||
ExecutionId = notification.OriginExecutionId,
|
||||
// ParentExecutionId (Audit Log #23): the originating routed run's
|
||||
// parent ExecutionId, carried from the site on NotificationSubmit and
|
||||
// persisted on the Notification row. Echoing it here links the central
|
||||
// NotifyDeliver rows to the routed run's parent. Null for non-routed runs.
|
||||
ParentExecutionId = notification.OriginParentExecutionId,
|
||||
Target = notification.ListName,
|
||||
Status = status,
|
||||
ErrorMessage = errorMessage,
|
||||
@@ -954,6 +960,10 @@ public class NotificationOutboxActor : ReceiveActor, IWithTimers
|
||||
// OriginExecutionId (Audit Log #23): the originating script execution's id,
|
||||
// carried from the site so the dispatcher can echo it onto NotifyDeliver rows.
|
||||
OriginExecutionId = msg.OriginExecutionId,
|
||||
// OriginParentExecutionId (Audit Log #23): the originating routed run's parent
|
||||
// ExecutionId, carried from the site so the dispatcher can echo it onto
|
||||
// NotifyDeliver rows.
|
||||
OriginParentExecutionId = msg.OriginParentExecutionId,
|
||||
SiteEnqueuedAt = msg.SiteEnqueuedAt,
|
||||
CreatedAt = DateTimeOffset.UtcNow,
|
||||
// Status stays at its Pending default for the dispatch sweep to claim.
|
||||
|
||||
Reference in New Issue
Block a user