Skip to content
Back to skills

Observability

ASecurity

Diagnose bugs and stabilize production systems and incidents. Use for root-cause debugging, logging, tracing, alerting, SLOs and error budgets, postmortems, network failures, on-call, product event tracking, A/B experiments, and watch-logs-and-fix loops. Trigger on 'prod is down', 'find this bug', 'why is this timing out', 'acompanhe os logs e corrija', 'set up an A/B test'.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 21, 2026
ai-agentsgobashdebugginggitapifrontendbackenddevopsperformance

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 18 files and shows the line behind each finding

Scanned November 21, 2026

npx -y skills add juninmd/skills --skill observability --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Observability?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Observability
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/juninmd-observability/badge)](https://www.skillsdirectory.com/skills/juninmd-observability)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: observability
description: |
  Diagnose bugs and stabilize production systems and incidents. Use for root-cause debugging, logging, tracing, alerting, SLOs and error budgets, postmortems, network failures, on-call, product event tracking, A/B experiments, and watch-logs-and-fix loops. Trigger on 'prod is down', 'find this bug', 'why is this timing out', 'acompanhe os logs e corrija', 'set up an A/B test'.
---


# Observability

**Not this skill:** adding tests for a bug you can already reproduce (`test-engineering`), or optimizing a path already diagnosed (`performance-engineering`).

## Preflight
```bash
rg -n 'OTEL_|opentelemetry|prom_client|micrometer' src/ | head
curl -sS localhost:9090/api/v1/status/tsdb 2>/dev/null | jq '.data.seriesCountByMetricName[:5]'  # cardinality today, if Prometheus runs locally on the default port
rg -n 'labels?\(|withTags' src/ | head        # what is already being labelled
git log --oneline -10                          # what changed recently, for a bug hunt
```

| Request | Path |
|---|---|
| Bug, failing test, or unexplained behavior with no proven cause | [debugging-phases.md](references/debugging-phases.md), every phase in order |
| Failure crosses the network, layer unknown | [diagnostics.md](references/diagnostics.md) layer triage, then debugging-phases |
| Production down, users affected | [incident-response.md](references/incident-response.md) first; diagnose after mitigation |
| Watch live logs and fix until clean | [log-watch-fix.md](references/log-watch-fix.md) |
| Design signals: SLIs, SLOs, instrumentation, alerts | Workflow steps 2–9 |

## Workflow
1. Classify the request with the table above. For a bug, follow [debugging-phases](references/debugging-phases.md): no hypothesis or fix until one already-run command goes red on the user's exact symptom; raise a flaky bug's repro rate before guessing; redact secrets and PII from every captured log.
2. Name the user-visible outcomes, then the SLIs that measure them: the four golden signals — latency, traffic, errors, saturation ([Google SRE, monitoring distributed systems](https://sre.google/sre-book/monitoring-distributed-systems/)). An SLI nobody can tie to a user is a graph, not a signal.
3. Set SLO targets with an explicit error budget ([Google SRE, embracing risk](https://sre.google/sre-book/embracing-risk/)), leaving room for change and for incident recovery. 100% is not a target; it is a refusal to ship. A budget policy should accompany each target: the action at exhaustion (for example, reliability work first, or a feature freeze that leaves reliability fixes flowing until the budget recovers), approvers (product, development, SRE), approval and next-review dates, and an escalation path for disputes over the calculation ([Google SRE workbook, implementing SLOs](https://sre.google/workbook/implementing-slos/)).
4. Instrument with OpenTelemetry rather than a handmade scheme: one SDK for logs, metrics and traces, trace context propagated across every hop, semantic conventions for span and attribute names. Use the stable HTTP names `http.request.method`, `http.response.status_code`, and `http.route` on server spans, stable since semconv v1.23.0 ([HTTP spans](https://opentelemetry.io/docs/specs/semconv/http/http-spans/); [stability announcement](https://opentelemetry.io/blog/2023/http-conventions-declared-stable/)). Fill `http.route` only from the framework's route template, never the raw path. Instrumentations keep emitting pre-stable names such as `http.status_code` until they opt in through `OTEL_SEMCONV_STABILITY_OPT_IN`, which is set per instrumentation: `http/dup` emits both sets during a phased rollout, and `http` emits only the stable names ([migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/)).
5. Emit structured events (JSON) carrying trace and span ids, duration, and outcome — never secrets or PII.
6. Add RED metrics (rate, errors, duration) at every service boundary; add tracing wherever latency crosses a service.
7. Choose sampling deliberately: head sampling cannot keep every error, but a tail sampler with an error policy can, within its buffer limits (see Sampling below).
8. Alert on symptoms and SLO burn rate, routed per Alert Routing below.
9. Verify signal quality: the dashboard, the alert, and the incident review must show the same number.

## Cardinality Is the Outage
Each label value multiplies stored series. One `user_id` label on a modest service is millions of series, and the first symptom is the metrics backend falling over during the incident you needed it for.

| Never a label | Use instead |
|---|---|
| user id, request id, session id | put it in the log/span, join by trace id |
| raw URL path (`/order/8123`) | the route template (`/order/:id`) |
| error message string | a bounded error code |
| customer name, email | a bounded tier or region |

Check the series count before shipping a new label — not after.

## Alert Routing
Page on symptoms — what a user feels — never on causes or every threshold crossing ([Google SRE, alerting philosophy](https://sre.google/sre-book/monitoring-distributed-systems/)). "Error rate over 1% for 5 minutes" is a symptom; "replica CPU over 80%" is a cause, and paging on it whether or not anyone was hurt is how on-call learns to silence its phone. Causes still earn a page only when they are a saturation resource about to become a symptom (disk filling, pool exhaustion, cert expiry) — see [alerting-and-oncall](references/alerting-and-oncall.md) for the burn-rate math and the on-call handoff checklist.

| Condition | Route | Why |
|---|---|---|
| User-visible SLO burning fast | **Page** | Someone must act now |
| Slow budget burn, toil, rising debt | **Ticket** | Real, not urgent |
| Saturation predicting an outage — disk filling, pool exhaustion, cert expiry | **Page** | Burn rate only turns positive after users are hurt |
| Everything else | **Dashboard** | Not every number deserves a human |

Multi-window burn rate beats a static threshold: a fast window (5m) catches the outage, a slow window (1h) suppresses the blip.

## Sampling

| Strategy | Keeps | Costs |
|---|---|---|
| Head (decide at ingress) | Cheap, simple | Blind — drops the slow trace you needed |
| Tail (decide after completion) | Slow and failed traces | Needs a buffering collector, more memory |
| Tail, error policy | Every ERROR-status trace that fits the buffer and completes within `decision_wait` | Buffering collector; all spans of one trace must reach the same collector instance |

Head sampling alone cannot keep every error. Server 4xx spans leave span status unset under the current HTTP conventions, so keep 5xx by status and 4xx by an explicit rule ([sampling concepts](https://opentelemetry.io/docs/concepts/sampling/)).

## Reference Routing
- SLO burn-rate math, toil, and the on-call handoff checklist: [alerting-and-oncall.md](references/alerting-and-oncall.md)
- Trace propagation across queues, log sampling at volume, clock skew, and retry storms: [resilience-and-tracing.md](references/resilience-and-tracing.md)
- A bounded loop that tails live logs, fixes root causes, redeploys, and re-watches until a clean window: [log-watch-fix.md](references/log-watch-fix.md)

See [Reference Map](references/TOPIC_MAP.md) for specialized references and sub-domain guides.

## Stop
- A proposed label is unbounded — user id, request id, raw path, error string. Stop; that is the outage, not the metric.
- An alert has no owner and no runbook. Write both before enabling it; until then it is noise with a pager attached.
- A threshold is being widened to silence a page. Either the signal is wrong or the system is; fix that, not the bound.
- A fix is proposed for a bug with no red-capable reproduction command. Return to Phase 1 of [debugging-phases](references/debugging-phases.md).

## Rules
- Hand off root cause code fixes to the domain skill (`backend-systems`, `frontend-engineering`), performance optimization to `performance-engineering`, and infrastructure config to `cloud-devops`.
- Test alert firing with a synthetic failure. An alert nobody has ever seen fire is an untested code path.
- Log levels mean things: debug for diagnosis, info for lifecycle events, warn for recoverable anomalies, error for user-visible failure. Everything at `error` is the same as nothing at `error`.
- Define retention and cost limits before the data grows; observability spend is the line item that surprises people, and `performance-engineering` owns the tradeoff.
- Trace context must survive every hop — queues and background jobs included. A trace that stops at the async boundary hides exactly the latency you are hunting; see [resilience-and-tracing](references/resilience-and-tracing.md) for propagation across message brokers.
- A retry without a cap, backoff, and jitter turns one slow dependency into a cascading failure; the stability patterns (circuit breaker, bulkhead, timeout, fail fast) are in [resilience-and-tracing](references/resilience-and-tracing.md), from Michael Nygard's *Release It!*.
- Manual, repetitive incident response that a machine could do is toil, not heroics ([Google SRE, eliminating toil](https://sre.google/sre-book/eliminating-toil/)); automate the third repeat, don't runbook it a fourth time.
- Live outage triage and postmortems belong to [incident-response](references/incident-response.md); design the signals they will read here.

## Checklist
- [ ] Bug work: a red-capable command ran before the fix and passes after it; quoted logs redacted.
- [ ] SLIs tie to user-visible outcomes; SLO targets, error budget, and budget policy (exhaustion action, approvers, review date) explicit.
- [ ] Trace context propagates across services, queues, and jobs, and appears in logs.
- [ ] Every metric label is bounded; series count checked before shipping.
- [ ] Alerts classified page/ticket/dashboard, each with an owner and a runbook.
- [ ] Alert firing exercised with a synthetic failure.
- [ ] Retention and cost limits set.
- [ ] On-call handoff checklist run before rotation changes hands.

Files in this skill

  • SKILL.md9.9 KB
  • references/TOPIC_MAP.md3.1 KB
  • references/alerting-and-oncall.md4.8 KB
  • references/debugging-phases.md10 KB
  • references/diagnostics-real-world-cases.md1.3 KB
  • references/diagnostics.md1.8 KB
  • references/incident-playbook.md2 KB
  • references/incident-response.md4.6 KB
  • references/log-sources.md1.8 KB
  • references/log-watch-fix.md4.3 KB
  • references/network-connectivity.md1.7 KB
  • references/network-http-ssl.md2 KB
  • references/postmortem-standards.md1.6 KB
  • references/product-analytics-and-experiments.md3.9 KB
  • references/real-world-cases.md1.7 KB
  • references/resilience-and-tracing.md7.5 KB
  • references/signature-ledger.md1.3 KB
  • scripts/signatures.mjs2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.