observability-and-instrumentationcommit fe6f081SKILL.md · Monitoring & Ops
Observability and Instrumentation
Instruments code with structured logs, RED/USE metrics, OpenTelemetry tracing, and symptom-based alerts with runbooks so production is diagnosable.
npx skills add addyosmani/agent-skills --skill observability-and-instrumentationCommand selected. Copy it manually.
- Permissions
- read-repo
- write-files
- shell
- network
- Compatible with
- Claude Code, Codex, Cursor, Copilot, Gemini CLI
- GitHub
- 112.3k
- Source
- Community · Addy Osmani
- Status
- Scan passed
- License
- MIT
- Category
- Monitoring & Ops
Core rule
Write down the questions on-call will ask before instrumenting; every signal must help answer one of them.
Execution Phases
Phase 01Define working
Write two to four questions on-call will ask about the feature as the basis for all telemetry.
Phase 02Logs and metrics
Emit JSON logs with stable event names and correlation IDs and no secrets or PII; add RED metrics with bounded labels and histograms.
Phase 03Distributed tracing
Use OpenTelemetry auto-instrumentation, add manual spans only around meaningful work, and propagate context across async boundaries.
Phase 04Alerts and runbooks
Alert only on user-facing symptoms with two severities, page and ticket, each linked to a runbook in docs/runbooks/.
Phase 05Verify the telemetry
In staging, force an error, send test traffic, follow one request end to end and test-fire each alert to check the output.
Permissions (summarised from SKILL.md)
| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Adds logging, metrics, tracing setup and alert rules to code, and writes runbooks under docs/runbooks/. |
| Command execution | Required | Runs the app or tests to trigger code paths and inspect the actual log and metric output. |
| Network outbound | Not required | The skill does not ask the agent to call external APIs; staging and tracing-UI checks are described as verification steps. |
SKILL.md frontmatter (YAML)
---
name: observability-and-instrumentation
description: Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.
---