Debug something you can't reproduce locally
Only happens on the live site, for some users.
This only happens in production: <describe> I can't reproduce it locally. Stack: <stack>. Host: <host>. I don't want to add print statements to a live site. Tell me: - What to log, temporarily, that would identify this — and how to scope it to just the affected case rather than every request. - What existing signals I might already have: access logs, error reports, host metrics. - Whether I can capture the full context of one failing request without recording everyone's data. - What differs between production and local that could cause this specifically. Nothing that logs personal data or secrets.
Log an identifier and the shape of the data, never the contents. You almost always need to know that a field was empty, not what was in it.