observability-setup
Logging, metrics, alerting, and dashboards setup using the RED method. Use when deploying a new service or container, reviewing observability gaps after an incident, or setting up monitoring infrastructure.
- License 许可
- MIT
- 所属仓库
- muratovv/ai-hats
- 最近更新
- 2026-11-05
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- observability-setup
- license
- MIT
- description
- Logging, metrics, alerting, and dashboards setup using the RED method. Use when deploying a new service or container, reviewing observability gaps after an incident, or setting up monitoring infrastructure.
03 SKILL.md 正文
Observability Setup
Ensure every service is observable: logs, metrics, alerts.
When to Use
Instrumenting a service so it can be observed — logs, metrics, alerts, dashboards (RED method). Two adjacent concerns are separate skills: the operational production-readiness gate (resource limits, health checks, fault tolerance) is reliability-checklist, and using the signals during a live outage is incident-response. This skill builds the telemetry; it does not gate readiness or run the incident.
Procedure
- Logging: JSON format for applications,
logrotatefor system/container logs. Centralized collection where possible. - Metrics: Expose
/metricsfor Prometheus. Cover CPU, memory, disk IO, and application-specific counters. - Alerting: Define thresholds for critical resources (disk >90%, CPU sustained >80%, memory >85%). Route alerts to the appropriate channel.
- Dashboards: Key service health visible at a glance. Latency, error rate, throughput (RED method).
- Retention: Define log and metric retention policy. Balance cost vs. debugging needs.
Completion
- Service has structured logging, metrics endpoint, and alerts
- Dashboard shows RED metrics (rate, errors, duration)
- Retention policy documented
Anti-Patterns
- Metrics without alerts — data nobody watches is useless
- Alerts without runbooks — alert fires and nobody knows what to do
- Logging PII or secrets — observability must not compromise security
04 同仓库更多 Skills
tool-evaluation-protocol
Time-bounded protocol for evaluating new tools, libraries, or methodologies before adoption. Use when evaluating a candidate dependency for the project, researching a methodology (e.g. ML/LLM frameworks, testing approaches), or following up on a hype-driven recommendation.
systematic-debugging
4-phase bug-fix protocol (evidence, pattern, hypothesis, verify). Use when investigating any error, failure, or unexpected behavior, handling bug reports from users or monitoring, or diagnosing test failures with non-obvious causes.
skill-template
Canonical template and validation guide for ai-hats skills. Use when creating a new skill, reviewing an existing one for structural compliance, or deciding which pattern fits a new behavior.
skill-optimization
Audit and refactor library components to eliminate redundancy and staleness. Use during periodic library maintenance, after adding multiple new skills or rules, when a role's token budget is too high, or after retrospectives identify component issues.
silent-fallback-gate
PreToolUse hook — refuses an Edit or Write that adds an inert broad except. Use when a Python edit was blocked for a silent fallback.
retro-to-framework
Convert an observation about agent behavior — from a retrospective or from a single incident — into a framework-level change (hook, rule, skill, skill update). Use after a retrospective identifies problems that are not project-specific, after an incident where an agent misapplied a component it had read, when CLAUDE.md band-aids accumulate (more than 3 per-project rules that could be generic), or when the same problem recurs across multiple projects.