AuditRecorder
AgentPrism.Core.dllA helper that supplies the common write path for all code that writes audit entries, including store decorators and endpoint-layer exceptions.
public static class AuditRecorderInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Applies the secret filter and swallows write errors. An audit trail error does not interrupt the operation; it is only logged. This is the rule that observability does not break functionality.
Methods
Section titled “Methods”WriteAsync(IAuditLog, IAuditActorResolver, ILogger, string, string, string, string?, string?, CancellationToken)
Section titled “ WriteAsync(IAuditLog, IAuditActorResolver, ILogger, string, string, string, string?, string?, CancellationToken)”Writes a secret-filtered audit entry. It logs an error without interrupting the operation.
public static ValueTask WriteAsync(IAuditLog auditLog, IAuditActorResolver actorResolver, ILogger logger, string tenantId, string action, string entity, string? before, string? after, CancellationToken cancellationToken)Parameters
Section titled “Parameters”auditLog IAuditLog
The log to write.
actorResolver IAuditActorResolver
The actor resolver.
logger ILogger
The logger for a write error.
tenantId string
The tenant identifier.
action string
The action name.
entity string
The affected entity.
before string?
The previous state as JSON text.
after string?
The next state as JSON text.
cancellationToken CancellationToken
The cancellation token.