← Integration Engineering
Integration Engineering

"Who Changed This Record?" You Should Have the Answer

20 Oct 2026·3 min read

A customer emails: "Your integration deleted employees from our HR system." Maybe it did. Maybe someone on their team did. Without a record of what your integration actually did, nobody can tell. Request logs help you debug. Audit logs answer who did what, to which record, when, and did it work.

What to log, and what never to log

The OWASP Logging Cheat Sheet, a free security guide, puts it in four words: when, where, who and what. For every call, log which account, which action, when, and whether it worked. Mask tokens, API keys and passwords. Keep sensitive personal data out, and log a record ID instead of a person’s details where you can.

{
  "time": "2026-10-20T04:00:12Z",
  "request_id": "req_7f3a",
  "tenant": "acme",
  "account": "acme-hr",
  "actor": "user:u_381",
  "action": "update_employee",
  "record": "emp_1042",
  "result": "success",
  "status": 200,
  "auth": "Bearer ****"
}
Example audit entry, the shape and not a real system. The token is masked, and the user is an ID, not an email.

Decide how long to keep them

Keeping logs forever feels safe. It is not, because old data can leak. OWASP says logs must not be deleted before the required retention period, and must not be kept beyond it. Set that period, and delete old logs on a schedule.

Make them searchable

Support should filter by customer and time, and find the answer in minutes, not days. Businesses, especially in HR and finance, often ask about logging before they sign.

Do this in 60 secondsSearch your code for where you log a request or its headers. Could the Authorization header, or a field named token, key or password, reach the log unmasked? If yes, fix that today.
Today’s AI angleWhen an AI agent calls tools, the log must name the human it acted for, not only "the agent". Pass the user’s identity with each tool call and log it. Then "who deleted this?" has a real answer.
"Who Changed This Record?" You Should Have the Answer · Ali Huzaifa