Plan Observability
Purpose
Define what telemetry each service emits, how it is correlated, stored and visualized, so that on-call can answer "is it broken, for whom, and why" quickly, at a cost the organization accepts.
When to use
- A new service is being designed or a service is being onboarded to production.
- Postmortems show long time to detect or diagnose because signals were missing or uncorrelated.
- Telemetry volume or cost has grown without a plan (high-cardinality metrics, debug logs in production).
When not to use
- Only the alerting rules need design and signals exist. Use
alert-design.
- The task is adding log statements to specific code. Use
logging-instrumentation.
- A single business dashboard is needed. Use
dashboard-spec.
Inputs
Required:
- Service list with a short description of each (type: API, worker, consumer, batch, frontend) and main dependencies.
- What telemetry exists today, or a statement that it is unknown.
Optional, improves quality:
- SLOs and critical user journeys; recent incidents and what was hard to diagnose.
- Telemetry backend constraints, retention limits, budget.
- Data classification of what may appear in logs (personal data, secrets).
If the service list is missing, ask for it. Do not assume a vendor; describe signals in neutral terms (an open standard such as OpenTelemetry may be named as a reference).
Process
- Map each service's role and its request/data flow, including async hops (queues, topics, schedulers) where context is usually lost.
- Define golden signals per service type: request services use rate, errors, duration (RED) plus saturation; resources use utilization, saturation, errors (USE); consumers add lag and age of oldest message; batch jobs add last success time, duration and records processed.
- Tie SLIs to the metrics above and confirm each SLO can be computed from them; list gaps.
- Specify structured logging: mandatory fields (timestamp, level, service, version, environment, trace ID, span ID, request or correlation ID, tenant if relevant), event naming, levels policy (no debug in production by default), and what must never be logged (secrets, tokens, full personal data; mask or hash instead).
- Specify tracing: entry and exit spans, context propagation across HTTP and messaging headers, span attributes to include, sampling strategy (head-based rate plus tail-based keep for errors and slow requests) and its effect on SLI accuracy.
- Set a cardinality and volume budget: forbid unbounded labels (user ID, full URL, request ID) on metrics, cap log volume per service, and define retention per signal (e.g. high-resolution short, aggregates long)
[PROPOSED].
- Design dashboards per audience: service overview (SLOs and golden signals), dependency view, and deep-dive; every dashboard answers one question and links to traces and logs with the same time range and filters.
- Cross-check against alerts and runbooks: every paging alert has the signals needed for its first diagnostic step.
- Define ownership, rollout order (highest-risk service first) and a verification step: a synthetic failure or recent incident replayed to prove the signals show it.
- Label every inference
[ASSUMPTION], list open questions, and suggest next skills: alert-design for paging, slo-definition if SLIs are missing, logging-instrumentation for code changes, runbook for diagnosis steps.
Output format
# Observability Plan: <system>
Scope: <services> · Owner: <team> · Backend: <neutral description or [UNKNOWN]>
## Service Signal Matrix
| Service | Type | Metrics (RED/USE/lag) | Key log events | Trace spans | SLI coverage |
## Logging Standard
- Mandatory fields / levels policy / never-log list
## Tracing and Context Propagation
## Cardinality, Volume and Retention Budget
| Signal | Resolution | Retention | Limit |
## Dashboards
| Name | Audience | Question it answers | Links |
## Gaps vs. SLOs, Alerts, Runbooks
## Rollout and Verification
## Assumptions and Open Questions
Quality checklist
Common pitfalls
- Dashboards full of host metrics and no user-facing signal. Start from SLIs and golden signals, add resources below them.
- Losing context at the message broker. Propagate trace context in message headers and record consumer spans linked to the producer.
- Sampling that silently drops the errors you need. Keep errors and slow traces regardless of head sampling rate.
Example
Input: ".NET order API, Kafka consumer, PostgreSQL; only container CPU/memory and plain-text logs."
Excerpt of output:
| Service |
Type |
Metrics |
Trace spans |
SLI coverage |
| order-api |
API |
rate, 5xx ratio, p95/p99 duration per route template |
inbound HTTP, DB query, Kafka produce |
availability, latency |
| order-consumer |
Consumer |
consumer lag, oldest message age, processing errors |
Kafka consume linked to producer span |
freshness [PROPOSED] |
Gap: order status freshness SLO cannot be computed today; needs message age metric.
1---2name: observability-plan3description: "Plans observability for one or more services: which metrics, structured logs and distributed traces to emit, correlation and context propagation, cardinality and retention budgets, dashboards per audience and gaps against SLOs and runbooks. Use when a service is being built or onboarded, when incidents take long to diagnose, when telemetry cost is out of control, or when someone asks what to instrument."4license: MIT5metadata:6 source: https://skillmd.com/skills/muratdincer/observability-plan7 version: "1.0.0"8 language: en9 category: 07-devops-sre10 role: sre11 area: reliability12 title: "Plan observability"13 related: "slo-definition, alert-design, logging-instrumentation, dashboard-spec, runbook"14 prompt: "Plan observability for our order service: .NET API, Kafka consumer, PostgreSQL. We only have container CPU/memory graphs and unstructured logs today."15---1617# Plan Observability1819## Purpose20Define what telemetry each service emits, how it is correlated, stored and visualized, so that on-call can answer "is it broken, for whom, and why" quickly, at a cost the organization accepts.2122## When to use23- A new service is being designed or a service is being onboarded to production.24- Postmortems show long time to detect or diagnose because signals were missing or uncorrelated.25- Telemetry volume or cost has grown without a plan (high-cardinality metrics, debug logs in production).2627## When not to use28- Only the alerting rules need design and signals exist. Use `alert-design`.29- The task is adding log statements to specific code. Use `logging-instrumentation`.30- A single business dashboard is needed. Use `dashboard-spec`.3132## Inputs33Required:34- Service list with a short description of each (type: API, worker, consumer, batch, frontend) and main dependencies.35- What telemetry exists today, or a statement that it is unknown.3637Optional, improves quality:38- SLOs and critical user journeys; recent incidents and what was hard to diagnose.39- Telemetry backend constraints, retention limits, budget.40- Data classification of what may appear in logs (personal data, secrets).4142If the service list is missing, ask for it. Do not assume a vendor; describe signals in neutral terms (an open standard such as OpenTelemetry may be named as a reference).4344## Process451. Map each service's role and its request/data flow, including async hops (queues, topics, schedulers) where context is usually lost.462. Define golden signals per service type: request services use rate, errors, duration (RED) plus saturation; resources use utilization, saturation, errors (USE); consumers add lag and age of oldest message; batch jobs add last success time, duration and records processed.473. Tie SLIs to the metrics above and confirm each SLO can be computed from them; list gaps.484. Specify structured logging: mandatory fields (timestamp, level, service, version, environment, trace ID, span ID, request or correlation ID, tenant if relevant), event naming, levels policy (no debug in production by default), and what must never be logged (secrets, tokens, full personal data; mask or hash instead).495. Specify tracing: entry and exit spans, context propagation across HTTP and messaging headers, span attributes to include, sampling strategy (head-based rate plus tail-based keep for errors and slow requests) and its effect on SLI accuracy.506. Set a cardinality and volume budget: forbid unbounded labels (user ID, full URL, request ID) on metrics, cap log volume per service, and define retention per signal (e.g. high-resolution short, aggregates long) `[PROPOSED]`.517. Design dashboards per audience: service overview (SLOs and golden signals), dependency view, and deep-dive; every dashboard answers one question and links to traces and logs with the same time range and filters.528. Cross-check against alerts and runbooks: every paging alert has the signals needed for its first diagnostic step.539. Define ownership, rollout order (highest-risk service first) and a verification step: a synthetic failure or recent incident replayed to prove the signals show it.5410. Label every inference `[ASSUMPTION]`, list open questions, and suggest next skills: `alert-design` for paging, `slo-definition` if SLIs are missing, `logging-instrumentation` for code changes, `runbook` for diagnosis steps.5556## Output format57```markdown58# Observability Plan: <system>59Scope: <services> · Owner: <team> · Backend: <neutral description or [UNKNOWN]>6061## Service Signal Matrix62| Service | Type | Metrics (RED/USE/lag) | Key log events | Trace spans | SLI coverage |6364## Logging Standard65- Mandatory fields / levels policy / never-log list6667## Tracing and Context Propagation68## Cardinality, Volume and Retention Budget69| Signal | Resolution | Retention | Limit |7071## Dashboards72| Name | Audience | Question it answers | Links |7374## Gaps vs. SLOs, Alerts, Runbooks75## Rollout and Verification76## Assumptions and Open Questions77```7879## Quality checklist80- [ ] Every service has golden signals appropriate to its type, including async lag where relevant.81- [ ] Trace and correlation IDs propagate across every synchronous and asynchronous hop.82- [ ] Every SLO can be computed from the planned signals, or the gap is listed.83- [ ] Unbounded metric labels are excluded and retention is defined per signal.84- [ ] A never-log list covers secrets and personal data, with masking guidance.85- [ ] A verification step proves the signals would show a real failure.86- [ ] All checks pass; if any fails, revise the output and re-run this checklist before answering.8788## Common pitfalls89- Dashboards full of host metrics and no user-facing signal. Start from SLIs and golden signals, add resources below them.90- Losing context at the message broker. Propagate trace context in message headers and record consumer spans linked to the producer.91- Sampling that silently drops the errors you need. Keep errors and slow traces regardless of head sampling rate.9293## Example94Input: ".NET order API, Kafka consumer, PostgreSQL; only container CPU/memory and plain-text logs."9596Excerpt of output:97| Service | Type | Metrics | Trace spans | SLI coverage |98|---|---|---|---|---|99| order-api | API | rate, 5xx ratio, p95/p99 duration per route template | inbound HTTP, DB query, Kafka produce | availability, latency |100| order-consumer | Consumer | consumer lag, oldest message age, processing errors | Kafka consume linked to producer span | freshness `[PROPOSED]` |101102Gap: order status freshness SLO cannot be computed today; needs message age metric.