AuditEntry
AgentPrism.Abstractions.dllA row in the audit trail that records who changed which entity and when.
public sealed record AuditEntry : IEquatable<AuditEntry>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”AuditEntry.Before and AuditEntry.After pass through a secret filter before they
are written: the values of the apiKey, authorization, token,
password and secret keys are replaced with "***".
Runs (an agent processing a message) are not written to this trail.
The runs table already holds the full record; writing it a second time would
turn the audit trail into the largest table and make it unreadable.
Constructors
Section titled “Constructors”AuditEntry()
Section titled “ AuditEntry()”public AuditEntry()Properties
Section titled “Properties”Action
Section titled “ Action”Gets the action name, for example agent.update.
public required string Action { get; init; }Property Value
Section titled “Property Value”Gets the actor that made the change. It is null when there is no authentication or the actor cannot be resolved; that state is not hidden.
public string? Actor { get; init; }Property Value
Section titled “Property Value”Gets the state after the change, as JSON text. It has passed the secret filter.
public string? After { get; init; }Property Value
Section titled “Property Value”Before
Section titled “ Before”Gets the state before the change, as JSON text. It has passed the secret filter.
public string? Before { get; init; }Property Value
Section titled “Property Value”CreatedAt
Section titled “ CreatedAt”Gets the time the record was written (UTC).
public required DateTimeOffset CreatedAt { get; init; }Property Value
Section titled “Property Value”Entity
Section titled “ Entity”Gets the affected entity, for example agent:support.
public required string Entity { get; init; }Property Value
Section titled “Property Value”Gets the hash of this entry, derived from its canonical form
(see AuditChainHasher in AgentPrism.Core). The write path
computes this value; a caller-supplied value is ignored.
public string? Hash { get; init; }Property Value
Section titled “Property Value”Gets the record id. A time-ordered UUID (v7).
public required Guid Id { get; init; }Property Value
Section titled “Property Value”PreviousHash
Section titled “ PreviousHash”Gets the hash of the previous entry of the same tenant. null for the first entry of a tenant.
public string? PreviousHash { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The chain is per TenantId: one tenant’s write rate never waits on
another tenant’s chain. The write path computes this value; a caller-supplied
value is ignored.
TenantId
Section titled “ TenantId”Gets the tenant the change belongs to.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(AuditEntry?)
Section titled “ Equals(AuditEntry?)”public bool Equals(AuditEntry? other)Parameters
Section titled “Parameters”other AuditEntry?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(AuditEntry?, AuditEntry?)
Section titled “ operator ==(AuditEntry?, AuditEntry?)”public static bool operator ==(AuditEntry? left, AuditEntry? right)Parameters
Section titled “Parameters”left AuditEntry?
right AuditEntry?
Returns
Section titled “Returns”operator !=(AuditEntry?, AuditEntry?)
Section titled “ operator !=(AuditEntry?, AuditEntry?)”public static bool operator !=(AuditEntry? left, AuditEntry? right)Parameters
Section titled “Parameters”left AuditEntry?
right AuditEntry?