feat(auditlog): NotifyDeliver rows carry the originating ExecutionId
This commit is contained in:
@@ -27,6 +27,15 @@ public class Notification
|
||||
public string SourceSiteId { get; set; }
|
||||
public string? SourceInstanceId { get; set; }
|
||||
public string? SourceScript { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The originating script execution's <c>ExecutionId</c> (Audit Log #23). Carried from
|
||||
/// the site on the <see cref="Commons.Messages.Notification.NotificationSubmit"/> so the
|
||||
/// central dispatcher can stamp the same id onto its <c>NotifyDeliver</c> audit rows,
|
||||
/// correlating them with the site-emitted <c>NotifySend</c> row. Null for notifications
|
||||
/// submitted before the column existed, or raised outside a script-execution context.
|
||||
/// </summary>
|
||||
public Guid? OriginExecutionId { get; set; }
|
||||
public DateTimeOffset SiteEnqueuedAt { get; set; }
|
||||
|
||||
/// <summary>Central ingest time.</summary>
|
||||
|
||||
@@ -4,6 +4,13 @@ namespace ScadaLink.Commons.Messages.Notification;
|
||||
/// Site -> Central: submit a notification for central delivery.
|
||||
/// Fire-and-forget with ack; the site retries until a <see cref="NotificationSubmitAck"/> is received.
|
||||
/// </summary>
|
||||
/// <param name="OriginExecutionId">
|
||||
/// The originating script execution's <c>ExecutionId</c> (Audit Log #23). Stamped at
|
||||
/// <c>Notify.Send</c> time and carried, inside the serialized payload, through the site
|
||||
/// store-and-forward buffer so the central dispatcher can echo it onto the
|
||||
/// <c>NotifyDeliver</c> audit rows. Additive trailing member — null for messages built
|
||||
/// before the field existed, or for notifications raised outside a script execution.
|
||||
/// </param>
|
||||
public record NotificationSubmit(
|
||||
string NotificationId,
|
||||
string ListName,
|
||||
@@ -12,7 +19,8 @@ public record NotificationSubmit(
|
||||
string SourceSiteId,
|
||||
string? SourceInstanceId,
|
||||
string? SourceScript,
|
||||
DateTimeOffset SiteEnqueuedAt);
|
||||
DateTimeOffset SiteEnqueuedAt,
|
||||
Guid? OriginExecutionId = null);
|
||||
|
||||
/// <summary>
|
||||
/// Central -> Site: ack sent after the notification row is persisted.
|
||||
|
||||
Reference in New Issue
Block a user