/System Design /Monitoring & Observability ← All Designs
📊

Monitoring & Observability

The three pillars: Metrics, Logs, and Distributed Traces

System Design Phase 4
📈 Metrics (Prometheus + Grafana)
Request Rate (req/s)
Error Rate (%)
P99 Latency (ms)
Memory Usage (%)
📝 Logs (ELK Stack — Elasticsearch, Logstash, Kibana)
🔍 Traces (Jaeger / Zipkin)
Active Alerts
0 active
No active alerts — system healthy
When to Use

Every production system needs all three pillars. Metrics tell you what's wrong (error rate high). Logs tell you why it's wrong (DB connection pool exhausted). Traces tell you where it's wrong (payment-svc timing out).

Trade-offs

Full trace collection has high storage cost — use head-based sampling (e.g. 1% of requests) or tail-based sampling (100% of errored traces). High log verbosity creates signal-to-noise problems; use structured JSON logs with severity levels.

Interview Tip

"The three pillars are complementary: metrics alert you, logs give context, traces show the path." Tools: Prometheus+Grafana (metrics), ELK Stack (logs), Jaeger/Zipkin (traces), or all-in-one like Datadog or OpenTelemetry.