agentleFS
patonkikhpatonkikh/APES/skills/architecture/observability-planner/skill.md

observability-planner

Skill3 starsChanged 4 months agoMITView on GitHub

Design observability for AI and distributed systems: traces, metrics, logs, dashboards, and alerting aligned to SLOs. Use when planning monitoring, debugging LLM pipelines, or production readiness reviews.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Document error budget and escalation when burned.

    line 33
  2. Distinctive:

    Use OpenTelemetry semantic conventions where available.

    line 44
  3. Distinctive:

    Never log raw prompts/responses in prod.

    line 83

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

Observability Planner

Purpose

Design observability for AI-powered systems: what to trace, measure, log, alert on, and display — aligned to SLOs and incident response.

Input: System architecture, SLO targets, critical user journeys, stack constraints (cloud, APM vendor)
Output: Observability Plan with signal catalog, dashboard specs, alert rules, and runbook hooks
Examples: See examples.md for worked input/output.


Workflow

Step 1: Define SLIs and SLOs

JourneySLISLO example
Chat responseAvailability + latency99.5% < 3s p95
RAG queryAnswer with citation98% success rate
Agent tool runTool success99% per tool
Batch ingestPipeline completion99.9% daily

Document error budget and escalation when burned.

Step 2: Apply three pillars per component

ComponentTracesMetricsLogs
API gatewayRequest spanRPS, 5xx rateAccess log
LLM callParent span + token attrslatency, tokens, costmodel_id, prompt_hash
Vector DBQuery spanrecall latencyindex version
Queue/workerJob spanbacklog depthjob_id, retries

Use OpenTelemetry semantic conventions where available.

Step 3: AI-specific observability

SignalImplementationAlert
Trace per inferenceSpan: llm.chat with gen_ai.* attrsp95 latency
RAG retrievalSpan: rag.retrieve + chunk IDsempty retrieval rate
Tool executionSpan per tool with success/failfailure rate >1%
Prompt versionprompt_version attributeN/A (dimension)
Costtoken_count × pricedaily budget
Quality proxyUser rating eventrating drop >10%

Correlate with analytics-instrumentation-planner product events.

Step 4: Design dashboards

DashboardAudiencePanels
Service healthOn-callSLO, error rate, latency heatmap
AI pipelineAI engineersToken usage, model mix, RAG stats
Business overlayProductDAU + error rate correlation

Each panel links to trace exemplar for drill-down.

Step 5: Define alerts and runbooks

AlertConditionSeverityRunbook
High 5xx>1% 5minP1Scale + rollback
LLM timeoutp95 > SLO 10minP2Model fallback
Ingest lag>1hP2Queue drain playbook
Cost spike+50% dailyP3Rate limit review

Alerts must be actionable; tie to owner and escalation path.

Step 6: Logging and privacy

  • Structured JSON logs with trace_id, user_id (hashed), request_id
  • Never log raw prompts/responses in prod; use opt-in debug tier
  • Retention: hot 7d, cold 30d, compliance per policy

Step 7: Validate

Run Validation checklist.


Decision Rules

ConditionAction
No SLO definedStop; propose SLIs from critical journeys
Multi-tenantTag all signals with tenant_id
Third-party LLM onlyTrace at client; log provider request IDs
Regulated dataNo full payload logging; spans only
ServerlessPrefer metrics + traces; minimize log volume cost

Validation

  • SLIs/SLOs per critical journey
  • Trace spans for LLM, RAG, and tools defined
  • Metrics catalog with names and labels
  • ≥2 dashboards specified with audience
  • Alerts with thresholds and runbook links
  • Privacy rules for prompts and PII in logs
  • Error budget policy documented
  • Correlation ID propagated end-to-end

Anti-patterns

  • Logs only — cannot debug distributed LLM latency without traces.
  • Alert fatigue — 50 thresholds nobody acts on.
  • Dashboard vanity — charts without SLO line.
  • Logging prompts in prod — security and compliance risk.
  • Missing business metrics — ops green while users churn.

Best Practices

  • Adopt OpenTelemetry early; one instrumentation for metrics + traces.
  • Store prompt_version and model_id on every LLM span.
  • Practice game days: inject failure, verify alerts fire.
  • Pair with ai-evaluation-builder for quality regressions.
  • Review observability coverage in architecture review checklist.

Output Structure

# Observability Plan: [System Name]

## SLOs
| Journey | SLI | Target | Error budget |
|---------|-----|--------|--------------|

## Signal Catalog
### Traces
[Span list + attributes]

### Metrics
[Name, labels, collection]

### Logs
[Fields, retention]

## Dashboards
[Panel descriptions]

## Alerts
| Name | Query | Threshold | Runbook |

## Privacy
[Logging restrictions]

## Rollout
[Instrumentation phases]

Next Skills

OutcomeRecommended Skill
Product-side metricsproduct/analytics-instrumentation-planner
AI eval regression gatesai/ai-evaluation-builder
Latency optimizationai/ai-latency-optimizer
Cost dashboardsai/ai-cost-optimizer
Architecture reviewarchitecture/architecture-review

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.