PREPROD
ReaderAuthor

relic

Audit Log Entry Metadata

The `metadata` on an AuditLogEntry is an optional JSON field that carries extra context an action needs beyond the standard columns.

1 min read · 2 depth levelsstratum-relic · vdevMatches production
Everyday

The structured columns on an audit entry — action, entityType, entityId, fieldName, oldValue, newValue, isNagpra — cover the common case, but some actions need to record additional detail that doesn't fit a fixed column. The metadata field is the flexible slot for that: a small bag of JSON where an action can stash supporting information, such as a reason for a status change or identifiers related to the operation. Because it is free-form JSON, it adapts to different action types without schema changes, and because it is optional, entries that don't need it simply leave it empty. Treat it as supplementary context rather than the primary record of what happened.

Technical section
Data model, API, and internals — visible to developers.
View as developer →
Was this helpful?