prod-observability
Skill2 starsChanged 5 months agoMITView on GitHub
Scaffold the PRODUCTION observability + alerting + notification stack into a shipped app — OTEL collector, Sloth SLO burn-rate rules, synthetic monitor, Alertmanager routing, Sentry release tracking. Distinct from the `observability` skill (which emits telemetry in app code) — this gives that telemetry a destination + makes SLOs fire alerts. Round 12 A.
In this repository60 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- analyzeSkill
- animation-disciplineSkill
- api-versioningSkill
- autopilotSkill
- browser-e2eSkill
- characterizeSkill
- clarifySkill
- codemodSkill
- constitution-compactSkill
- constitutionSkill
- context-budgetSkill
- creative-webSkill
- db-migrationSkill
- debugSkill
- detect-stackSkill
- dispatch-criteriaSkill
- dreamSkill
- experimentSkill
- fastapiSkill
- flag-cleanupSkill
- flag-rolloutSkill
- flask-realtimeSkill
- framework-detectorSkill
- front-end-designSkill
- grill-meSkill
- handoffSkill
- image-generationSkill
- implementSkill
- initiativeSkill
- instinctSkill
- loopSkill
- nextjsSkill
- observabilitySkill
- okr-alignSkill
- parallel-swarmSkill
- pivotSkill
- planSkill
- pr-bodySkill
- prime-disciplineSkill
- react-nodeSkill
- react-viteSkill
- release-trainSkill
- researchSkill
- reviewSkill
- security-guardSkill
- self-healSkill
- shipSkill
- skill-creatorSkill
- specifySkill
- tailwind-disciplineSkill
- tasksSkill
- tdd-loopSkill
- token-budgetSkill
- typographySkill
- verify-loopSkill
- verifySkill
- wip-checkpointSkill
- <kebab-case-skill-name>Skill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Read the spec's ## SLOs + ## Rollout sections + slo.yml.
- Very specific: line 30
Run slo-gen.sh → commit deploy/prometheus-slo-rules.yaml (this is the #1 thing — turns SLO doc into enforcement).
- Very specific: line 33
Add the @synthetic tag to the read-only critical journey in e2e/.
- Distinctive: line 34
Verify: a deliberate test breach (raise error rate in staging) → SLO rule fires → Alertmanager pages + dispatches → hotfix pipeline opens …
- Very specific: line 46
SLO must be enforced, not documented: If slo-gen.sh didn't run, the SLO is vapor.
- Distinctive: line 47
Synthetic journeys are read-only: Never mutate prod data in a monitor.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Production Observability
Mandate
The observability skill makes the app EMIT logs/metrics/traces. This skill gives them a HOME and makes the SLO actually fire. The gap it closes: slo.yml declares burn-rate thresholds that, without this, nothing evaluates at runtime.
What it scaffolds (from templates/observability/)
| Template | Drops to | Purpose |
otel-collector.yaml | deploy/otel-collector.yaml | app OTLP → collector → Tempo/Prometheus/Loki (swappable) |
slo-gen.sh (script) | runs at ship time | compiles slo.yml → Prometheus multi-burn-rate rules (Sloth) |
synthetic-monitor.yml | .github/workflows/ | Playwright critical journey vs PROD every 5 min |
alertmanager.yaml | deploy/alertmanager.yaml | severity routing → PagerDuty (page) + Slack + hotfix dispatch |
sentry-release.sh | scripts/ | release tag + source maps → error maps to commit/PR |
Procedure
- Read the spec's
## SLOs+## Rolloutsections +slo.yml. - Copy the 5 templates into the shipped repo (substitute
service,PROD_URL, backend endpoints). - Run
slo-gen.sh→ commitdeploy/prometheus-slo-rules.yaml(this is the #1 thing — turns SLO doc into enforcement). - Wire the app SDK:
OTEL_EXPORTER_OTLP_ENDPOINT→ collector; Sentry init withrelease+environment+spec.idtag. - Set repo variables:
PROD_URL,PROM_URL,PROM_REMOTE_WRITE,TEMPO_ENDPOINT,LOKI_ENDPOINT,PUSHGATEWAY_URL; secrets:PAGERDUTY_ROUTING_KEY,SLACK_WEBHOOK_URL,SENTRY_AUTH_TOKEN,GH_DISPATCH_PAT. - Add the
@synthetictag to the read-only critical journey ine2e/. - Verify: a deliberate test breach (raise error rate in staging) → SLO rule fires → Alertmanager pages + dispatches → hotfix pipeline opens an issue.
The correlation chain (Round 12 D)
trace_id (W3C traceparent) → service spans → log lines (shared trace_id) → release=<SHA> (Sentry tag + OTEL service.version) → commit (Sentry suspect-commits) → spec (spec.id OTEL resource attr + github_issue). Click a prod error → land on the introducing PR.
How it feeds the hotfix pipeline
Alertmanager severity:page → webhook → GitHub repository_dispatch: prod-alert → hotfix-ingest.yml → hotfix-to-task.sh → top-of-queue task + hotfix issue → autonomous fix → PR. This skill creates the alert source the hotfix loop consumes.
Hard rules
- SLO must be enforced, not documented. If
slo-gen.shdidn't run, the SLO is vapor. - Synthetic journeys are read-only. Never mutate prod data in a monitor.
- Page only on
severity:page. SEV3/4 → Slack ticket, not a wake-up. - Backend is swappable. App emits OTLP; only the collector's exporter block changes per backend.
- Source maps + release tags are non-negotiable for prod JS/TS — without them, errors are unreadable minified stacks.
References
- OTEL Collector: https://opentelemetry.io/docs/collector/configuration/
- Sloth (SLO → Prometheus): https://sloth.dev/
- Multi-window multi-burn-rate: Google SRE Workbook ch.5
- Sentry releases: https://docs.sentry.io/product/releases/
Done means
deploy/prometheus-slo-rules.yamlcommitted (SLO enforced)- Collector + Alertmanager configs in
deploy/ - Synthetic monitor workflow running every 5 min
- Sentry release tracking in the ship pipeline
- A test breach demonstrably pages + opens a hotfix
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

