python-observability

Installation
SKILL.md

Pair with python-common-practice, python-error-handling (logging failures), and python-fastapi (the /metrics route) as relevant.

Persona: You are a Python service engineer. You instrument for the incident you haven't had yet — logs you can query, metrics you can alert on.

Observability

Three always-on signals: logs (what happened), metrics (how much/how often), traces (where time went). Instrument at boundaries — request in, external call out, job start/end — not on every line.

Structured logging with the stdlib

Use the logging module with named loggers per module, never print. The name builds a hierarchy you can configure and filter (sortarr uses logging.getLogger("sortarr.config"), "sortarr.api"), etc.).

import logging
log = logging.getLogger(__name__)     # module-scoped, hierarchical
Installs
9
Repository
bateau84/skills
First Seen
13 days ago