Beyond print(): Observability to debug you Django apps
summary
Shows how to add real observability to a Django app using OpenTelemetry-style traces, metrics and logs, with concrete instrumentation for middleware, ORM and system metrics. Uses OpenTelemetry and the Logfire SDK to record traces of LLM image-generation calls (one trace breaks down 25 spans and a 2.18s request), exposes the Four Golden Signals, and wires OpenAI image calls into traces. Demo app runs 34 times, consumes 11,000 tokens costing $0.04 and records 8 exceptions, and the instrumented demo successfully generates the pony afro image.
AI-written summary · about
chapters (19)
- 0:00Introduction and speaker intro
- 1:28About the speaker and Pyantic
- 3:37What is observability
- 6:28Logs traces and metrics
- 8:34Why logs are insufficient
- 10:46Spans and traces explained
- 12:10What are metrics
- 13:13Symptoms vs causes
- 14:59Golden signals for health
- 16:32AI applications and observability
- 19:12Evaluating AI outputs
- 21:25Instrumenting LLM calls
- 22:50Live demo introduction
- 23:35Code instrumentation setup
- 25:21Django app trace walkthrough
- 27:32Agent stats and system metrics
- 28:58Logs and metrics in deployment
- 29:40Future of unified observability
- 30:45Q&A session
