Practice skill: make a change observable, with a rollback trigger. Use in an aidd repository when writing an observe block or adding logs, metrics, traces, or alerts.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Observability?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/thaithienvanid-observability)
---
name: observability
description: "Practice skill: make a change observable, with a rollback trigger. Use in an aidd repository when writing an observe block or adding logs, metrics, traces, or alerts."
metadata:
checked: "2026-10-22"
---
# Observability
**Use it when** you write a Spec's `observe` block, instrument a change, or run the observe window after release.
**Do not use when** the change produces no runtime behavior worth watching. A docs-only or build-only change has no signal, and an observe block for it is a formality.
## Standards
<!-- aidd:gen practice:observability -->
| Standard | Edition |
| --- | --- |
| SLIs, SLOs, and error budgets (Google SRE book and workbook) | — |
| The four golden signals, and the RED and USE methods | — |
| OpenTelemetry for traces, metrics, and logs | 1.45.0 |
| OpenTelemetry GenAI semantic conventions (emerging) | — |
| W3C Trace Context: standard HTTP headers (traceparent and tracestate) for distributed tracing | Level 1 |
| The OWASP Logging Cheat Sheet and the OWASP Application Logging Vocabulary for security events | — |
| The Twelve-Factor App | — |
| Post-incident review action items are tracked to closure, because an untracked action item is the same incident booked twice | — |
Each standard's checked date and source are in the aidd-team roles reference (`references/roles.md` in `aidd-team:aidd-team`), section `aidd-team:observability`.
<!-- aidd:end -->
## Specify
- Name the SLI showing the change works, the SLO it must hold, the observe window, and a rollback trigger tied to error-budget burn or a symptom threshold.
- Name the dashboard or query a human watches (`signals`), and any post-release command that exits 0 when healthy (`command`). Without an observability service, the signal is a local command or log query a person runs. Never require one the project lacks.
- Alert on error-budget burn, not on causes: page at 14.4 times the budget's rate over 1 hour, or 6 times over 6 hours, each confirmed by a window one twelfth as long.
- Add a runbook Task for each new failure mode, written after Spec approval in `docs/runbooks/`. Each alert links its runbook.
## Implement
- Traces propagate context across every hop. Propagate W3C `traceparent` and `tracestate` over HTTP. On a public API, trace unauthenticated callers differently, or rate-limit what you record, so a caller's `sampled` flag cannot run up your tracing bill. Restart `traceparent` at the edge only as an explicit choice. Keep confidential data out of `tracestate`, or leave it out of requests to external systems. [w3c-trace-context] Carry trace context across queues and workers too (OpenTelemetry messaging conventions). Metrics follow the semantic conventions (GenAI for model and agent calls) and carry the dimensions the SLI needs. Logs are structured and joined to traces by id.
- Log the fact, not the sensitive value: `password reset sent` with the user id, never the email or the token. Every log and span attribute passes through one redaction step: a case-insensitive key deny-list (`password`, `token`, `secret`, `authorization`, `cookie`, `email`, `phone`, and the project's own), applied to nested maps and lists, masking too much rather than too little. How, with its test: [references/redaction.md](references/redaction.md).
- Security events are logged with a stable name and the actor: authentication success and failure, authorization denial with the resource, privileged or admin operations, rate-limit hits, and repeated authentication failures from one source.
- Health and readiness endpoints reflect the change. Feature flags show in telemetry.
- Telemetry cost (labels, sampling, volume at 10x): [references/telemetry-cost.md](references/telemetry-cost.md).
### Twelve-Factor
The runtime factors are this skill's. The build and deploy ones are `aidd-team:ci-pipeline`'s.
- **Config in the environment:** every value that differs between deploys is an environment variable, read and validated at start by the one configuration boundary of `aidd-team:secure-coding`.
- **Backing services**, such as a database, queue, or cache, are a URL and credentials in config, so a swap changes only config.
- **Disposability:** stateless processes start in seconds. On SIGTERM they stop taking work, finish or hand back in-flight work within a deadline, and exit 0.
- **Logs:** one JSON object per line to stdout, never a file the app writes.
- **Admin processes**, such as a migration, run as a command from the same release and config, never in a shell on a server.
Test: the Operability smoke of `aidd-team:product-defaults` runs these, from `/healthz` to SIGTERM mid-request. Add a start with a required variable unset, which exits non-zero naming it.
## Roll out
- Run the Spec's observe command once, or poll it until the window ends. Stop when the rollback trigger fires. Record the result in the Spec's `outcome`. Compare canary and baseline on the SLI where the project runs a canary, else before and after. When the trigger fires, say so first and stop. Humans roll back.
## Test commands
| Command | Proves | How |
| --- | --- | --- |
| Telemetry test exporter | the spans and metrics the SLI needs are emitted | an OpenTelemetry test exporter in the tests |
| Alert rule tests | each alert fires on its condition, and only then | `promtool test rules`, or the equivalent |
| Synthetic check | the critical path works from outside | a scheduled synthetic request, in the observe window |
| Redaction test | a nested payload with `token` and `email` (mixed case, in a list) comes out masked | a unit test of the redaction step |
| Security event tests | each security event is emitted with its name and actor, and no secret | a test per event |
| Metric cardinality test | label values stay bounded | references/telemetry-cost.md |
- From `aidd-team:product-defaults`: Operability smoke.
## Stop if
- A change ships with no SLI, no window, or no rollback trigger.
- A log or span attribute bypasses the redaction step.
- The trigger fired and the rollout is still widening.
## Hand off
- Done: the observe block, the instrumentation, and the runbook. Next role: the SRE for the rollout, the author for the observe window. Needs: an SLO the product manager has not set. Stopped at: none, or the stop rule's code.