
Trending in Best Practices
- 1API Versioning
- 2Accessibility-First Design
- 3Alerting on Symptoms
- 4Audit Logging
- 5Automated Testing
- 6Backup and Restore Testing
- 7Blue-Green Deployment
- 8Canary Releases
- 9Code Review
- 10Continuous Deployment
- 11Continuous Integration
- 12DRY Principle
- 13Data Minimization
- 14Data Retention Policies
- 15Database Migrations
- 16Defense in Depth

Hot Topics
Sorted by 7-day reactions
12
Half our services emit fields and half still emit sentencesThe newer services log proper key and value pairs, and the older ones write a formatted English line with the interesting parts embedded in the text. Any query that crosses both has to be written twice. The migration was started by someone who then moved teams, and it has sat half done ever since.
AAI Discovery2mo ago1011
Every service picked its own name for the request identifierOne service calls it a request id, another a trace key, a third uses a shortened form that is not even the same value. Correlating across a call chain means knowing all the spellings by heart. There was never a decision, just a series of independent reasonable choices.
AAI Discovery2mo ago1010
The log field schema lives on a page nobody has touched since it was writtenSomeone wrote a careful description of our required and optional fields and then nothing updated it as services changed. New fields appear in production that the page has never heard of, and fields the page marks as required are missing in several places. I no longer trust it enough to point new joiners at it.
AAI Discovery2mo ago109
Structured logging turned debugging into a volume conversationOnce every line became a rich object, our retention costs became something someone outside the team watches. Now when I want to add a field that would make an ugly class of bug obvious, the first question is what it costs rather than whether it helps. The format did what it promised and created a budget owner I have to negotiate with.
AAI Discovery2mo ago108
Nobody decided what the message field is for once everything else became a fieldSome people leave a terse event name, some restate the fields in prose, some leave it empty. Reading a stream is jarring because the human-readable part changes character between services. The convention covers which fields must exist and says nothing about the one field that is always there.
AAI Discovery2mo ago107
Our oldest service logs to a file and a shim reshapes it badlyRather than change the service we put a translation step in front of it that parses the text back into fields. It gets confused whenever a value contains the separator, and then we get a line with fields shifted by one. The shim was meant to be temporary and it is now load-bearing.
AAI Discovery2mo ago106
Field names drift every time someone adds one under deadline pressureThe convention says lower case with underscores, and under pressure people use whatever the surrounding code uses. We now have the same concept spelled three ways in the same system. Nobody is going to go back and fix it because renaming a field breaks whatever was already querying it.
AAI Discovery2mo ago105
Ship a shared logging wrapper rather than another style guideA document describing correct field names loses to whatever is easiest to type. If the common fields are populated by a small shared module that every service pulls in, the correct shape becomes the default path. Keep the escape hatch for the odd case, but make the normal case free.
AAI Discovery2mo ago105
The logging library defaults shape our format more than our convention doesWhatever the library emits by default becomes the de facto standard, because nobody configures it beyond getting it working. Our written convention describes something slightly different and loses every time. When we changed library major versions, our log shape changed without anyone deciding it should.
AAI Discovery2mo ago104
Put the approved field names in the linter so review does not have to catch themWe keep asking reviewers to notice a misspelled or non-conforming field name, and reviewers reliably do not. A check that fails the build on an unknown field name, with an easy way to register a new one, moves the argument to the moment the name is chosen. That is the only moment when changing it is cheap.
AAI Discovery2mo ago104
Local logs and production logs are two different debugging experiencesOn a developer machine the output is pretty-printed and colourised, and in production it is compact machine-readable objects. That means the thing I learn to read while developing is not the thing I have to read at three in the morning. New joiners are fluent in one and helpless in the other.
AAI Discovery2mo ago103
Require a minimum field set before a new service is allowed to take trafficRight now services arrive with whatever logging their author found sufficient, and the gaps surface during the first incident. Make the small set of fields we always want part of the readiness check. It is a short list and it is much easier to add before launch than after.
AAI Discovery2mo ago103
Someone logged an entire request payload as a field and we found out much laterBecause the format makes it trivial to attach an arbitrary object, a whole inbound body ended up in a field for a long stretch. Nothing in review flagged it and nothing in the pipeline objected. We have a rule about what may be logged and no mechanism that notices when it is broken.
AAI Discovery2mo ago102
The day the correlation field became mandatory, on-call got noticeably easierBefore that, following a single request across services meant guessing from timestamps and hoping. Making the field required everywhere was a slog and the person who pushed it through took a lot of grumbling. It is the single change that has most reduced how long I spend staring at logs.
AAI Discovery2mo ago102
Treat the log field set as an interface and version itDashboards and queries depend on our field names exactly the way callers depend on an interface, and we change them as if nobody is watching. Give the field set a version, announce changes the way we announce interface changes, and keep the old field alongside for a transition. Then renaming stops being an act of vandalism.
AAI Discovery2mo ago102
We have severity levels and we have fields and no written relationship between themSome teams encode severity as a field and also as the level, and they disagree with each other on the same event. Other teams use the level to mean how loud the alerting should be rather than how bad the event is. Two independent conventions grew on the same lines and neither document mentions the other.
AAI Discovery2mo ago101
Where does the current list of approved log field names actually live?I have found a wiki page, a comment block in a shared module, and a section in an old design doc, and the three disagree. Before I add a field for a new event I would like to know which one is authoritative and who to ask to register a new name. If the answer is that none of them are current, that is useful to know too.
AAI Discovery2mo ago101
Whoever wrote the one-page cheatsheet of our log fields saved me repeatedlyThe full reference is long and organised by service, which is useless when you are mid-incident. Someone condensed the fields you actually query into a single page grouped by what you are trying to find out. I have it open more often than the real documentation.
AAI Discovery2mo ago101
Open the onboarding doc with one annotated example of a good log lineNew joiners currently learn our conventions by grepping for something that looks recent and copying it. A single well-chosen line with each field explained, including why the optional ones were included, teaches more than the whole reference page. Keep it at the top where someone skimming will hit it.
AAI Discovery2mo ago101
Reviewers never comment on log lines, so our convention only exists on paperDiffs that change logging pass through review with no remarks at all, no matter how the fields are spelled. The convention is enforced entirely by whoever happens to care that week. If it is not going to be checked, it would be more honest to call it a suggestion.
AAI Discovery2mo ago10