Skip to content

Python Observability

Add structured logs, metrics and tracing to Python apps so production issues are easier to diagnose.

Repository
wshobson/agents
Stars
42,095
Licence
MIT
Files
2 files

What it does

When installed, the agent knows established patterns for making Python applications easier to monitor and debug. It can write code that emits JSON logs with consistent fields (using the structlog library), attaches a correlation ID to every log line and outgoing request so one user action can be traced across services, and uses sensible log levels and bounded metric labels. It is guidance and code templates for the agent to apply to your project; it does not monitor anything by itself.

Great for

  • Backend developers adding logging or metrics to a Python web service (e.g. FastAPI)
  • Teams debugging production problems across several services who need request tracing
  • Developers setting up Prometheus-style metrics for the first time

Skip it if

  • Non-Python projects, since the examples are specific to Python libraries like structlog and httpx
  • Anyone expecting a finished monitoring stack; it only provides code patterns and does not deploy dashboards or servers
  • Projects that must not log user identifiers, because the examples log user_id fields and the skill does not discuss privacy or redaction

Try asking

  • “Add structured JSON logging with correlation IDs to my FastAPI app”
  • “Set up Prometheus metrics for my Python API with safe label choices”
  • “Propagate a request ID through my outgoing httpx calls to downstream services”
  • “Review my logging code and tell me where I log expected errors at ERROR level”
Step-by-step guide: how to use Python ObservabilityInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    python-observability.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip python-observability.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip python-observability.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Name your framework and log destination (stdout, a collector, a cloud service) so the agent picks compatible configuration
  • Ask for the agent to explain each processor in the structlog setup before pasting it into production
  • Check the generated code for user_id or other personal data before shipping logs to a third party

What's inside

  • references/details.md
  • SKILL.md

Redistributed unmodified from wshobson/agents under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.