All comparisonsObservability
Metrics vs Logs
Metrics are numeric measurements sampled over time, request rate, latency, CPU usage, cheap to store and great for dashboards, alerts, and spotting trends. Logs are timestamped, often unstructured text records of individual events, expensive to store at scale but rich in detail for figuring out exactly what happened during a specific incident.
Left
Metrics
Right
Logs
Data shapeNumeric, time-seriesText/structured event records
Storage cost at scaleLow, pre-aggregatedHigh, every event is stored
Best forDashboards, alerting, trend detectionRoot-cause investigation of a specific event
Query pattern"How has latency trended this week?""What exactly happened at 14:03:12 for request X?"
Common toolsPrometheus, Grafana, DatadogLoki, ELK stack, Splunk
Use Metrics when
You need to know something is wrong, right now or over time, without drowning in detail.
Use Logs when
You already know something is wrong and need the exact sequence of events to explain why.
The verdict
Metrics tell you that something broke and when. Logs (and traces) tell you why. A healthy observability stack needs both, plus traces to connect them.
Study this on the roadmap