Agent Skills
› aiming-lab/MetaClaw
› structured-logging-and-observability
structured-logging-and-observability
GitHub为生产服务、管道或自动化系统添加结构化日志、指标和健康检查,以支持调试、监控和审计。
Trigger Scenarios
构建需监控的生产服务
实现可观测性需求
Install
npx skills add aiming-lab/MetaClaw --skill structured-logging-and-observability -g -y
SKILL.md
Frontmatter
{
"name": "structured-logging-and-observability",
"category": "automation",
"description": "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."
}
Structured Logging and Observability
Log levels:
DEBUG: detailed diagnostic (off in production)INFO: normal operation milestonesWARNING: recoverable unexpected stateERROR: 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.
Version History
- 922caf3 Current 2026-07-25 11:08


