Part 12 / Topic 6 of 7
Audit logging
Operational logs (Part 11) answer "what happened"; the audit log answers "who did what, when" — and it exists for compliance and forensics, not debugging. Every write action gets a record: actor, action, object, timestamp, outcome.
{"when": "2025-04-09T14:02:11Z", "actor": "ravi@acme", "action": "shipment.status.update",
"object": "S-2003", "from": "in_transit", "to": "delivered", "via": "dispatch-api"}
Properties that make it an audit log rather than just more logs: append-only (nobody edits history), complete for writes (reads optional, writes always), and attributable (service accounts do not hide the human — the API key maps to a team, the UI passes the user through). When security asks "who changed this shipment in March?", the answer is a query.
Done here? The practice set for Part 12 — 4 exercises with solutions — is on the part page.