MetaClaw structured-logging-and-observability
Use this skill when building production services, pipelines, or automation that needs to be debugged, monitored, or audited. Add structured logs, metrics, and health checks before shipping any service.
install
source · Clone the upstream repo
git clone https://github.com/aiming-lab/MetaClaw
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/aiming-lab/MetaClaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/memory_data/skills/structured-logging-and-observability" ~/.claude/skills/aiming-lab-metaclaw-structured-logging-and-observability && rm -rf "$T"
manifest:
memory_data/skills/structured-logging-and-observability/SKILL.mdsource content
Structured Logging and Observability
Log levels:
: detailed diagnostic (off in production)DEBUG
: normal operation milestonesINFO
: recoverable unexpected stateWARNING
: operation failed, action neededERROR
Structured logs (JSON) over free-form text:
import structlog log = structlog.get_logger() log.info("request_complete", method="POST", path="/api/data", status=200, latency_ms=42)
Metrics to expose: request rate, error rate, latency (p50/p95/p99), queue depth.
Health check endpoint:
/health returning {"status": "ok"} — required for load balancers.
Anti-pattern: Logging only on error; you can't diagnose what you didn't observe.