Observability

Backend Fundamentals · 6 lessons

  1. Structured logging — Analogy Think of a diary. A free‑text diary is great for storytelling, but if you want to find all entries about “rain” you have to read every page. A structured diary has tags…
  2. Log levels — Log levels appear everywhere in real backend stacks: Express middleware, FastAPI logging, PostgreSQL log_min_error_statement, Redis loglevel, and even AI inference pipelines that…
  3. Correlation IDs — In real systems, correlation IDs appear in HTTP headers (X-Request-ID, X-Correlation-ID), gRPC metadata, message queue headers, and database query tags.
  4. Centralized logging — Analogy Think of each service as a department in a company. Each department keeps its own notebook (local logs). A CEO (the ops team) needs a single company ledger that records…
  5. CPU metrics — Motivation When a backend runs, the CPU is the engine that turns code into work. If the engine is over‑worked, requests slow down, queues grow, and the system can crash. If the…
  6. Memory metrics — They are the foundation for capacity planning, alerting, and performance tuning.