skills/aiming-lab/metaclaw/structured-logging-and-observability

structured-logging-and-observability

SKILL.md

Structured Logging and Observability

Log levels:

  • DEBUG: detailed diagnostic (off in production)
  • INFO: normal operation milestones
  • WARNING: recoverable unexpected state
  • ERROR: operation failed, action needed

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.

Weekly Installs
2
GitHub Stars
1.5K
First Seen
5 days ago
Installed on
amp2
cline2
opencode2
cursor2
kimi-cli2
codex2