Beyond grep: Practical Logging and Metrics
summary
Practical takeaways: use Sentry for error aggregation to get immediate, de-duplicated alerts (saves hundreds of emails) and return error IDs to users; collect metrics in a time-series DB—prefer InfluxDB over Graphite today—and favour percentiles (75/90/95) not averages; pick UDP StatsD for minimal overhead or in‑app aggregation with Dropwizard/Coda Hale for richer local dashboards; centralize structured logs as JSON and ship to ELK (Logstash → Elasticsearch → Kibana); use structlog/structured logging to bind context and the pipeline (runit → file → Logstash → ES → Kibana) proves reliable.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 0:37Speaking Speed vs Wi-Fi Speed
- 1:57GOALS
- 3:22REQUIREMENTS
- 8:17VANILLA
- 9:18DJANGO
- 9:41PROGRESS
- 10:16METRICS?
- 10:54SYSTEM METRICS VS APP METRICS
- 14:50MONITORING
- 20:02APPROACHES
- 22:56SCALES
- 32:13bind values log.bind(key value)
- 34:51import logging, sys
- 35:46CAPTURE
- 39:42ERRORS
- 40:18PYRAMID ERROR VIEW
- 41:23WSGI SERVERS
- 42:30MIDDLEWARE
- 43:20EXTRACT FROM LOGS
- 45:57SUMMARY
