python-observability

Installation
Summary

Structured logging, metrics, and distributed tracing patterns for Python production systems.

  • Covers four core observability areas: structured JSON logging with structlog, Prometheus metrics for the four golden signals (latency, traffic, errors, saturation), correlation ID propagation across service boundaries, and OpenTelemetry distributed tracing
  • Includes semantic log level guidance, bounded cardinality rules for metrics to prevent storage explosion, and context manager patterns for consistent operation timing
  • Provides FastAPI middleware examples for correlation ID injection, decorator patterns for request instrumentation, and best practices for avoiding unbounded metric labels
  • Demonstrates end-to-end patterns from request ingress through downstream service calls, with code examples for logging, metrics collection, and span creation
SKILL.md

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.

Related skills

More from wshobson/agents

Installs
6.2K
Repository
wshobson/agents
GitHub Stars
35.3K
First Seen
Jan 30, 2026