Skip to content

AuditRecorder

Namespace AgentPrism · Assembly AgentPrism.Core.dll

A helper that supplies the common write path for all code that writes audit entries, including store decorators and endpoint-layer exceptions.

public static class AuditRecorder

objectAuditRecorder

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

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.

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)

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.

ValueTask