Skip to main content

AuditEvent

Namespace: Meshmakers.Octo.Runtime.Contracts.AuditTrails

A categorised, rendered audit event published by an engine-side audit-trail forwarder and consumed by a host-supplied IAuditEventSink. Carries enough information for host sinks to persist (event log), forward (message bus), or simply log it, without needing to know which typed forwarder produced it.

public record AuditEvent : IEquatable<AuditEvent>

Inheritance ObjectAuditEvent
Implements IEquatable<AuditEvent>

Properties

TenantId

The tenant the event belongs to, or null for the system tenant (e.g. import of system models). Sinks use this for routing (per-tenant event log vs. system event log).

public string TenantId { get; set; }

Property Value

String

Level

Severity classification.

public AuditEventLevel Level { get; set; }

Property Value

AuditEventLevel

Category

Stable dotted identifier describing the kind of event (e.g. CkModelImport.ExtensibleEnumOverride, Archive.Transition). Sinks can use this for filtering or to choose a finer-grained source identifier in the event log.

public string Category { get; set; }

Property Value

String

Message

Human-readable rendered message. Forwarders are responsible for producing this in a reader-friendly form including the structured values from AuditEvent.Metadata. The platform event log stores this verbatim.

public string Message { get; set; }

Property Value

String

Metadata

Optional structured payload corresponding to the placeholders in the rendered AuditEvent.Message. Sinks that emit structured logs or push to a message bus use this; sinks that only persist a flat event-log entry can ignore it.

public IReadOnlyDictionary<string, object> Metadata { get; set; }

Property Value

IReadOnlyDictionary<String, Object>

Constructors

AuditEvent(String, AuditEventLevel, String, String)

A categorised, rendered audit event published by an engine-side audit-trail forwarder and consumed by a host-supplied IAuditEventSink. Carries enough information for host sinks to persist (event log), forward (message bus), or simply log it, without needing to know which typed forwarder produced it.

public AuditEvent(string TenantId, AuditEventLevel Level, string Category, string Message)

Parameters

TenantId String
The tenant the event belongs to, or null for the system tenant (e.g. import of system models). Sinks use this for routing (per-tenant event log vs. system event log).

Level AuditEventLevel
Severity classification.

Category String
Stable dotted identifier describing the kind of event (e.g. CkModelImport.ExtensibleEnumOverride, Archive.Transition). Sinks can use this for filtering or to choose a finer-grained source identifier in the event log.

Message String
Human-readable rendered message. Forwarders are responsible for producing this in a reader-friendly form including the structured values from AuditEvent.Metadata. The platform event log stores this verbatim.