Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

Recording Who Did What

Last updated:

Reconstruction is the standard

The question is rarely “what is the current state?” It is “how did this record get into this state, and who decided?” That requires history recorded at the time.

History cannot be reconstructed after the fact. Either it was recorded when the change happened or the answer does not exist.

What to record

  1. Who — the authenticated user, or the system process
  2. When — with a time zone
  3. What changed — field, old value, new value
  4. Why, where a reason is required by the process
  5. From where — the web interface, an import, an API

Not everything needs it

AuditDo not bother
Financial recordsSession data
Anything customer-facingCache entries
Permission changesSearch logs
Status transitionsDraft working data
Anything disputedEphemeral records

Auditing everything produces volume that makes finding the important entries harder. Audit what matters.

Make it immutable and queryable

  • Write-once — audit records that can be edited are not audit records
  • Queryable per record, so a specific history is retrievable quickly
  • Retained per your records policy
  • Visible to the people who need it, restricted from those who do not

Balance against data minimisation

Full audit history contains personal data, and retaining everything indefinitely conflicts with minimisation obligations.

Set a retention period aligned to your records policy and apply it automatically. Both requirements can be met; neither is met by accident.

Frequently asked questions

Should we use an audit library?

Established options handle model change tracking well. Business-level events frequently need explicit recording alongside.

How long should audit data be kept?

As long as the underlying business record, typically. Align it to your existing policy.

Does it slow things down?

Marginally. Writing audit records on high-volume tables needs consideration; on ordinary business records it is negligible.

Who should see the audit trail?

Those who need it for their role. It contains information about colleagues' actions and should not be generally visible.

Keep reading

Cannot explain how a record reached its current state?

That is an audit gap. Adding history to the models that matter is a contained piece of work.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning