Observability: logs, metrics and traces
Observability means being able to answer new questions about a running system from the data it gives off, without shipping new code: is checkout slow, for whom, since when, and where. Three kinds of data do most of the work: metrics, logs and traces. In an interview, a few lines on each in your wrap-up, with what you'd measure, show you've run a system and not just drawn one.
A parcel delivery company
A delivery company has a board at head office showing parcels delivered per hour, the share that were late, and how full the vans are. Each driver keeps a notebook: "14:02, number 12, nobody home, card left". And every parcel has a tracking number that lists each depot it passed through and how long it sat there.
- a parcel → a request, and each depot → a service it passes through
- the board → metrics: numbers counted over time, cheap, for "is something wrong?"
- the drivers' notebooks → logs, written by each instance: a line per event with its details, for "what exactly happened?"
- the tracking number → the trace ID, and its history → a trace: one request's path through every service with the time spent in each, for "where did the time go?"