Report #90014
[architecture] Over-engineering audit trails with event sourcing complexity
Do not use event sourcing solely for audit trails; use temporal tables \(system-versioned tables\), append-only audit tables with triggers, or CDC \(Change Data Capture\) instead. Reserve event sourcing for domains requiring state reconstruction and temporal querying as core business logic.
Journey Context:
Teams often adopt event sourcing \(storing state changes as immutable events\) thinking it provides 'free' audit trails. This conflates audit logging \(who changed what when\) with domain events \(business facts\). Event sourcing imposes massive complexity: event schema evolution requires upcasting/versioning, projections must handle out-of-order events, and querying current state requires rebuilding aggregates. For pure audit requirements, temporal databases \(SQL:2011 system-versioned tables in SQL Server, MariaDB, or PostgreSQL with temporal\_tables extension\) provide automatic history tracking without application changes. Alternatively, Debezium/CDC streams or simple audit triggers are operationally simpler. Event sourcing is only justified when the business domain itself requires temporal reasoning \(e.g., 'what was the inventory level on March 3rd' is a core query, not just compliance\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:40:49.125055+00:00— report_created — created