EngineeringSample article
Write logs for the person on call
A useful log explains what happened, where to look and what can safely be tried next.
The person reading an error message may be tired, unfamiliar with the code and trying to help somebody waiting for an answer. Give them enough context to begin.
Describe the event
Prefer a named event to an isolated statement that something failed. Include a stable operation identifier and the stage that was reached. Keep personal data and credentials out of the message.
A timeout during validation and a timeout after a payment provider accepted a request require different responses. The log should help distinguish them.
Keep context structured
Use fields that can be searched consistently. A short, stable event name makes it easier to connect a support report with the underlying operation.
event: "request.delivery_failed"
request_id: "sample-042"
stage: "notification"
retryable: trueRehearse a failure
Introduce a safe failure in a test environment and ask a colleague to find its cause using only the available diagnostics. The gaps in that exercise are more useful than a longer logging checklist.
A note from the room.This is a placeholder article for testing the reading experience.
↑