Video in progress
What are the "three pillars" of observability?
Logs, metrics and traces. A log is a detailed record of an individual event, a metric is a number aggregated over time, and a trace is the path of a single request across services.
📖 Answer
A log is "at 14:02:11 the payment for order 42 was declined, reason: card expired". Detailed, but it takes up a lot of space and searching it is more expensive.
A metric is a number and a time: http_requests_total, jvm_memory_used_bytes. Cheap to store, handy for drawing graphs and setting alerts. But it doesn't answer "which exact request".
A trace shows how one request went from the gateway to order-service, then to payment-service, then to the database, and how long each step took.
The usual workflow goes like this: the metric says "p99 latency went up", the trace says "the time is going into a SQL query in payment-service", and the log tells you which exact request it was and what the error was.
These days profiling (CPU/allocation profiles) is often added as a fourth signal, but in an interview they mostly ask about these three.
Sign up to mark studied questions and save your progress.