observability-strategy
Observability across metrics / logs / traces / events / profiles. Tool selection, structured logging, metric cardinality discipline, distributed tracing via OTel, SLO-burn alerting, dashboards per audience.
What this skill does
# Observability Strategy
You design observability: metrics, logs, traces, events, profiling. Goal: understand system behavior in production without redeploy.
## Core rules
- **Three pillars + events + profiles** — no single pillar is enough
- **OpenTelemetry default** — standards-based, vendor-neutral
- **Structured logging** — JSON with common fields
- **Cardinality discipline** — metrics explode with high-cardinality tags; use sparingly
- **Alert on SLO burn, not symptoms** — symptom alerts create fatigue
- **Dashboards per audience** — ops, oncall, product, leadership see different views
## Pillars
| Pillar | Purpose | Good at | Tools |
|---|---|---|---|
| **Metrics** | Aggregate trends over time | "Is something getting worse?" | Prometheus, Datadog, New Relic |
| **Logs** | Discrete events with context | "What happened at time X?" | ELK, Loki, Datadog Logs, Splunk |
| **Traces** | End-to-end request path across services | "Why is this slow?" | Jaeger, Tempo, Honeycomb, Datadog APM |
| **Events** | Business / deploy / incident markers | "Correlate with changes" | Sentry events, PagerDuty, deploys in metrics |
| **Profiles** | Continuous CPU / memory profiling | "Where is time spent?" | Pyroscope, Datadog Continuous Profiler |
## OpenTelemetry
Standard instrumentation:
- **SDK** per language (auto-instrumentation for common libs)
- **Collector** receives + processes + forwards
- **OTLP protocol** vendor-neutral
- Works with any backend (Datadog, Jaeger, Tempo, Prometheus, etc.)
Default to OTel unless specific vendor SDK required.
## Structured logging
JSON logs with common fields:
```json
{
"timestamp": "2026-04-17T12:00:00.123Z",
"level": "INFO",
"service": "order-api",
"trace_id": "abc...",
"span_id": "def...",
"user_id": "hashed",
"request_id": "req-xyz",
"message": "Order placed",
"order_id": "ord-123",
"duration_ms": 45
}
```
Rules:
- ISO 8601 timestamps with UTC + milliseconds
- Consistent field names across services
- No PII in logs
- Redaction of known sensitive patterns
- Sampling for verbose (DEBUG) logs
## Metric naming + cardinality
Naming convention: `namespace_metric_unit_suffix` (Prometheus style).
Examples:
- `http_requests_total` (counter)
- `http_request_duration_seconds` (histogram)
- `active_users` (gauge)
**Cardinality** = unique combinations of label values.
- Low-cardinality labels safe: env, service, region, status-code bucket
- Avoid: user_id, session_id, request_id as metric labels
- High cardinality → metric DB blows up (Prometheus loses data; Datadog costs explode)
Use **traces + logs** for per-user data; **metrics** for aggregates.
## Distributed tracing
- Every external request → root span
- Trace propagated via W3C Trace Context headers
- Spans for each service call, DB query, external API
- Span attributes: user_id (hashed), request_id, key operations
- Sampling: head-based (sample % at ingress) + tail-based (always keep errors / slow)
## Alerting philosophy
- **Alert on SLO burn** (fast-burn for big outages, slow-burn for leaks) — see `slo-sli-definition`
- **NOT on symptom metrics** (e.g., "CPU > 80%") — these create fatigue without actionability
- **Each alert actionable** — if no action, delete alert
- **Runbook linked** from every alert
- **Severity tiers**: P1 pages, P2 email, P3 dashboard-only
## Dashboards per audience
| Audience | What they see |
|---|---|
| **Oncall** | SLO burn, recent deploys, error-rate, top latencies |
| **Product / PM** | User funnel, feature usage, NPS proxies |
| **Leadership** | Uptime, revenue-impacting incidents, MTTR |
| **Dev team** | Service-specific metrics, latency breakdown, deploy effects |
| **Support** | Per-customer incidents, status-page-aligned |
## Tool selection
For small / greenfield: Datadog / New Relic (managed, all pillars, priced per host).
For self-hosted / cost-conscious: Prometheus + Grafana + Loki + Tempo + OpenTelemetry Collector.
For advanced investigation: Honeycomb / Lightstep (best-in-class traces + exploration).
For enterprise: Splunk / Dynatrace.
## Report
```markdown
# Observability Strategy: [System]
## Pillars Covered
[Metrics / logs / traces / events / profiles]
## Tool Selection
[Chosen + rationale]
## OpenTelemetry Adoption
[Coverage plan]
## Structured Logging Standard
[Field schema + naming]
## Metric Naming + Cardinality
[Naming convention + cardinality rules]
## Distributed Tracing
[Propagation + sampling + span attributes]
## Alerting Philosophy
[SLO-burn + runbooks + severity tiers]
## Dashboards per Audience
[Oncall / PM / leadership / dev / support]
## Data Retention + Cost
[Per pillar + budget]
## Rollout Plan
[Instrumentation phased]
```
## Failure behavior
- Symptom-based alerts flood oncall → migrate to SLO-burn
- High-cardinality metrics → refactor to traces / logs
- Non-standard log format → apply schema
- mmdc failure → see mixin
Related in Data & Analytics
clawarr-suite
IncludedComprehensive management for self-hosted media stacks (Sonarr, Radarr, Lidarr, Readarr, Prowlarr, Bazarr, Overseerr, Plex, Tautulli, SABnzbd, Recyclarr, Unpackerr, Notifiarr, Maintainerr, Kometa, FlareSolverr). Deep library exploration, analytics, dashboard generation, content management, request handling, subtitle management, indexer control, download monitoring, quality profile sync, library cleanup automation, notification routing, collection/overlay management, and media tracker integration (Trakt, Letterboxd, Simkl).
querying-soql
IncludedSOQL query generation, optimization, and analysis with 100-point scoring. Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance or safety improvements for Salesforce queries. TRIGGER when: user writes, optimizes, or debugs SOQL/SOSL queries, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER when: bulk data operations (use handling-sf-data), Apex DML logic (use generating-apex), or report/dashboard queries.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
habit-flow
IncludedAI-powered atomic habit tracker with natural language logging, streak tracking, smart reminders, and coaching. Use for creating habits, logging completions naturally ("I meditated today"), viewing progress, and getting personalized coaching.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
visualizing-data
IncludedBuilds dashboards, reports, and data-driven interfaces requiring charts, graphs, or visual analytics. Provides systematic framework for selecting appropriate visualizations based on data characteristics and analytical purpose. Includes 24+ visualization types organized by purpose (trends, comparisons, distributions, relationships, flows, hierarchies, geospatial), accessibility patterns (WCAG 2.1 AA compliance), colorblind-safe palettes, and performance optimization strategies. Use when creating visualizations, choosing chart types, displaying data graphically, or designing data interfaces.