Observability explained: logs, metrics and traces
When a system misbehaves in production, observability is what lets you understand why. It is commonly broken into three types of telemetry.
Logs Timestamped records of events, such as "user 42 failed login" or a stack trace. Great for detailed context about specific events.
- Use structured logs (for example JSON) so they are searchable
- Avoid logging secrets or personal data
- Control volume and retention to manage costs
Metrics Numeric measurements over time: request rate, error rate, latency, CPU and memory use. Cheap to store and ideal for dashboards and alerts.
- Common frameworks focus on rate, errors and duration for services, and utilization, saturation and errors for resources
Traces Follow a single request as it moves through multiple services, showing where time is spent. Essential for debugging microservices.
Putting it together
- Metrics tell you something is wrong
- Traces show you where it is wrong
- Logs explain why it is wrong
Standards OpenTelemetry has become a widely adopted vendor-neutral standard for collecting all three types of data.
Alerting tips Alert on symptoms users feel, such as high error rates or slow responses, rather than every internal fluctuation, to avoid alert fatigue.
What does your observability stack look like? What metric or alert has caught the most real incidents for you?
Comments · 3
The business side is about cost: telemetry volume costs money, and teams often over-collect. Start with the questions you need answered.
Dashboards matter as a UX problem. A dashboard that needs an expert to read it isn't doing its job.
Where do you start on a small project? Is structured logging plus a couple of metrics enough before adding traces?