Ch 20: Building Production AI Systems - Advanced¶
Track: Advanced | Try code in Playground | Back to chapter overview
Read online or run locally
You can read this content here on the web. To run the code interactively, either use the Playground or clone the repo and open chapters/chapter-20-building-production-ai-systems/notebooks/03_observability_and_cost.ipynb in Jupyter.
Chapter 20: Production AI Systems — Notebook 03 (Observability & Cost)¶
You can't operate what you can't see. We instrument the service with structured logs and the golden signals, then connect them to SLOs and cost.
What you'll learn¶
| Topic | Section |
|---|---|
| Structured logging | §1 |
| Golden signals and percentiles | §2 |
| SLOs, error budgets, and cost | §3 |
Time estimate: 2.5 hours
Key concepts¶
- Golden signals — latency, traffic, errors, saturation.
- Percentiles — p99 latency matters more than the average.
- Error budget — how much unreliability your SLO permits before you slow down releases.
Structured logs plus the golden signals make a service observable; SLOs and error budgets turn reliability into decisions; caching and batching are the first levers for cost.
Run the full notebook in the chapter folder for code and outputs.
Generated by Berta AI