How the log digest reads
The digest is short by construction and empty most hours, which is a property worth protecting. A channel that carries something every hour is a channel where an empty hour means nothing, and an empty hour is the most common true state of a small system.
Key takeaways
- Most hours the digest is empty and it is not sent at all.
- An entry is: the example line, the counts, the function, and why it is here.
- The example line is a real line, not a fingerprint, and it is the first thing shown.
- Two buttons: expected, and worth looking at. Both are recorded.
- The daily summary carries shape counts; the hourly digest never does.
An hour with something in it
10:00–11:00
- New shape — 11 occurrences,
order-workerOrder 84412 failed after 1203ms: serialisation error in line item 3
First seen 10:14. Not present in the previous 30 days. - Rate change —
apiRetrying upstream request (attempt 2)
412 this hour, usually 20–40 at this hour on a Tuesday. Share of total logs up from 0.4% to 6%. - Two buttons on each: expected · worth looking at
Two entries and that is the whole message. The example line comes first in each because it is the thing that lets somebody recognise the problem in a second; the counts and the history are context underneath it.
Why the real line goes first
A fingerprint is unreadable and a count is uninterpretable without knowing what is being counted. “Shape a3f21c is up 10x” requires a lookup before it means anything, and a digest that requires a lookup does not get read on a phone.
The first real line seen for that shape in that hour costs one extra field to store and turns the entry into something a person understands immediately, including a person who has never heard of this system.
The empty hours
- App integration
- Machine learning
- Management
Refusing to send a long digest
Twenty-three anomalous shapes in one hour is either a genuine major incident, in which case somebody already knows, or a problem with the system itself — a deploy that changed every log message, a fingerprinting change, a log group that started including something new.
In both cases a list of twenty-three entries is the wrong output. So above a threshold the digest collapses to one line saying how many and pointing at the daily summary, which is both more readable and more accurate about what is actually being said.
The two buttons
“Expected” and “worth looking at”, both recorded against the shape. Neither changes the system’s behaviour automatically, and that restraint is deliberate: a shape marked expected once should not be permanently silenced, because the same shape at a hundred times the rate next month is a different event.
What the answers do is accumulate. A shape marked expected on eight separate occasions is a shape whose rate check is set too tight, and that appears in the monthly review as a specific suggestion rather than as something somebody has to notice.
The daily summary
- Machine learning
- Management
- Analytics
Four findings out of six marked expected means two thirds of what the system reported was not worth reporting, and that is a bad ratio that will end with the digest being ignored. One or two out of six is healthy; the multiplier on the rate check is the knob that moves it.
Next: what all of this costs to run.
All posts