
Python Observability
Sets up proper observability for Python apps when your production systems inevitably break and you need answers fast. Configures structlog for JSON logging with correlation IDs that thread through request chains, implements the four golden signals (latency, traffic, errors, saturation) with Prometheus metrics, and shows you how to instrument endpoints without creating cardinality explosions. The correlation ID propagation patterns alone will save you hours of log diving when tracking down distributed system failures. Focuses on the practical stuff that actually helps during 3am incidents.
- skills.sh installs
- 12K
- GitHub stars
- 42.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshobson/agents --skill python-observability --agent claude-codeInstalls into .claude/skills of the current project.
Files
Python Observability
Instrument Python applications with structured logs, metrics, and traces. When something breaks in production, you need to answer "what, where, and why" without deploying new code.
When to Use This Skill
- Adding structured logging to applications
- Implementing metrics collection with Prometheus
- Setting up distributed tracing across services
- Propagating correlation IDs through request chains
- Debugging production issues
- Building observability dashboards
Core Concepts
1. Structured Logging
Emit logs as JSON with consistent fields for production environments. Machine-readable logs enable powerful queries and alerts. For local development, consider human-readable formats.
2. The Four Golden Signals
Track latency, traffic, errors, and saturation for every service boundary.
3. Correlation IDs
Thread a unique ID through all logs and spans for a single request, enabling end-to-end tracing.
4. Bounded Cardinality
Keep metric label values bounded. Unbounded labels (like user IDs) explode storage costs.
Quick Start
import structlog
Sponsors
Details
- Repository
- github.com/wshobson/agents
- Categories
- DevOps & CI/CD, Debugging, Python
More from wshobson/agents
All 174- Shellcheck Configuration12K
- Python Configuration12K
- Cost Optimization11.9K
- Embedding Strategies11.8K
- Data Quality Frameworks11.7K
- Startup Metrics Framework11.7K
- Go Concurrency Patterns11.7K
- Prometheus Configuration11.6K
- Billing Automation11.6K
- K8s Manifest Generator11.6K
- Python Background Jobs11.6K
- Ml Pipeline Workflow11.5K
- Context Driven Development11.5K
- Dependency Upgrade11.5K
- Competitive Landscape11.5K
- Bats Testing Patterns11.4K
- Memory Forensics11.4K
- Risk Metrics Calculation11.4K
- Python Resource Management11.4K
- Binary Analysis Patterns11.4K
- Cqrs Implementation11.4K
- Workflow Patterns11.4K
- Incident Runbook Templates11.4K
- Airflow Dag Patterns11.3K