Skip to main content
Table of Contents

Class LoggerEventBundleExtensions

Namespace
Stratara.Shared.Diagnostics.Extensions
Assembly
Stratara.Shared.dll

Source-generated structured-logging helpers for event-bundle integrity verification. Used by every worker that consumes EventBundles off the message bus (projection, saga). Backed by LoggerMessageAttribute with stable event ids from LogEvents.EventBundleIntegrity.

public static class LoggerEventBundleExtensions
Inheritance
LoggerEventBundleExtensions
Inherited Members

Remarks

EventBundle carries no top-level Id property — bundles are identified by the id of their first event plus the bundle event count. That pair is unique enough for forensic correlation against the event-stream table without forcing a new wire-format field.

Methods

LogEventBundleIntegrityRejected(ILogger, Guid, int)

Logs that an event bundle was rejected under Strict mode because its signature did not verify.

[LoggerMessage(EventId = 111104, Level = LogLevel.Error, Message = "Event bundle (first event {FirstEventId}, {EventCount} events) carries a signature that does not verify (Strict mode) — rejecting bundle.")]
public static void LogEventBundleIntegrityRejected(this ILogger logger, Guid firstEventId, int eventCount)

Parameters

logger ILogger

The logger to emit through.

firstEventId Guid

Id of the first event in the rejected bundle.

eventCount int

Number of events in the rejected bundle.

LogEventBundleIntegrityWarning(ILogger, Guid, int)

Logs that an event bundle carried a signature that did not verify, and is still being dispatched under Permissive mode.

[LoggerMessage(EventId = 111003, Level = LogLevel.Warning, Message = "Event bundle (first event {FirstEventId}, {EventCount} events) carries a signature that does not verify (Permissive mode) — dispatching anyway. The publisher holds a different key, or the bundle was altered in transit.")]
public static void LogEventBundleIntegrityWarning(this ILogger logger, Guid firstEventId, int eventCount)

Parameters

logger ILogger

The logger to emit through.

firstEventId Guid

Id of the first event in the bundle.

eventCount int

Number of events in the bundle.

LogEventBundleUnsignedRejected(ILogger, Guid, int)

Logs that an event bundle was rejected under Strict mode because it carried no signature.

[LoggerMessage(EventId = 111105, Level = LogLevel.Error, Message = "Event bundle (first event {FirstEventId}, {EventCount} events) carries no signature (Strict mode) — rejecting bundle. A publisher is not signing.")]
public static void LogEventBundleUnsignedRejected(this ILogger logger, Guid firstEventId, int eventCount)

Parameters

logger ILogger

The logger to emit through.

firstEventId Guid

Id of the first event in the rejected bundle.

eventCount int

Number of events in the rejected bundle.

LogEventBundleUnsignedWarning(ILogger, Guid, int)

Logs that an event bundle carried no signature, and is still being dispatched under Permissive mode.

[LoggerMessage(EventId = 111004, Level = LogLevel.Warning, Message = "Event bundle (first event {FirstEventId}, {EventCount} events) carries no signature (Permissive mode) — dispatching anyway. Expected while publishers are still being rolled over to signing; afterwards it means a publisher was missed.")]
public static void LogEventBundleUnsignedWarning(this ILogger logger, Guid firstEventId, int eventCount)

Parameters

logger ILogger

The logger to emit through.

firstEventId Guid

Id of the first event in the bundle.

eventCount int

Number of events in the bundle.