observability-debug
Skill1 starsChanged 9 months agoMITView on GitHub
Uses traces, logs, and metrics together to diagnose production issues. Covers correlation techniques, distributed tracing analysis, log query patterns, and the workflow from alert to root cause. Use when investigating production issues, analyzing incidents, or debugging distributed systems.
In this repository48 other files it gives its agents.
- accessibilitySkill
- api-designSkill
- api-integrationSkill
- architectSkill
- async-patternsSkill
- best-practicesSkill
- bugSkill
- buildSkill
- cachingSkill
- ci-cdSkill
- config-managementSkill
- containerizeSkill
- database-designSkill
- data-modelingSkill
- data-pipelineSkill
- debug-latencySkill
- dependency-updateSkill
- deploySkill
- dev-setupSkill
- docsSkill
- error-handlingSkill
- estimateSkill
- feature-flag-opsSkill
- git-recoverySkill
- i18nSkill
- iacSkill
- incidentSkill
- load-testingSkill
- loggingSkill
- migrateSkill
- monitoringSkill
- onboardSkill
- perfSkill
- phase-gateSkill
- pr-authorSkill
- qaSkill
- refactorSkill
- reviewSkill
- rollbackSkill
- schema-evolutionSkill
- scope-checkSkill
- security-auditSkill
- state-managementSkill
- tech-debtSkill
- tech-stackSkill
- telemetrySkill
- testingSkill
- workflowSkill
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
- Distinctive: line 28
Before diving into logs, understand the blast radius.
- Distinctive: line 32
When did it start? (correlate with deployments, config changes)
- Distinctive: line 63
Deploy markers: Every graph should show deployment timestamps.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Observability Debugging
Monitoring tells you SOMETHING is wrong. Observability debugging tells you WHAT, WHERE, and WHY.
The Investigation Workflow
1. ALERT fires (or user reports issue)
↓
2. SCOPE: What's affected? How bad? Since when?
↓
3. HYPOTHESIZE: What could cause this? (deployment? dependency? traffic?)
↓
4. NARROW: Use metrics → logs → traces to find the exact component
↓
5. ROOT CAUSE: Identify the specific failure
↓
6. FIX / MITIGATE: Resolve and verifyStep 1: Scope the Problem
Before diving into logs, understand the blast radius.
Check dashboards (30 seconds):
- Which service(s) are affected?
- When did it start? (correlate with deployments, config changes)
- Is it getting worse, stable, or recovering?
- Is it affecting all users or a subset? (region, client version, endpoint)
Key questions:
- Error rate: Is it 0.1% of requests or 50%?
- Latency: Is it slow for everyone or just some?
- Traffic: Did traffic change? (spike, drop, pattern shift)
- Recent changes: Was anything deployed in the last 2 hours?
Step 2: Metrics → Narrow the Component
Metrics tell you WHERE to look. Start broad, zoom in.
Service-level metrics (error rate by service)
→ "order-service error rate is 15%"
→ Endpoint-level metrics (error rate by endpoint)
→ "POST /orders is 40% errors, other endpoints fine"
→ Dependency metrics
→ "payment-service latency p95 spiked to 10s"Correlation Techniques
Time correlation: Overlay metrics on the same timeline.
Error rate spike at 14:23 + deploy at 14:20 = likely deploy issue
Error rate spike at 14:23 + payment-service latency spike at 14:22 = likely dependencyDeploy markers: Every graph should show deployment timestamps. Most production issues correlate with a recent change.
Comparison: Compare today's metrics to yesterday/last week. What's different?
Step 3: Logs → Find the Error
Once you know WHICH service and WHICH endpoint, query logs.
Log Query Patterns
# Start broad: errors in the affected service + timeframe
service = "order-service" AND level = "error" AND timestamp > 14:20
# Narrow by endpoint
service = "order-service" AND path = "/orders" AND status >= 500
# Find a specific request
request_id = "req_abc123"
# Find patterns
service = "order-service" AND message LIKE "timeout" AND timestamp > 14:20
# Count errors by type (what's the most common failure?)
service = "order-service" AND level = "error" | group by message | countWhat to Look For in Logs
- Error messages and stack traces
- Timeout indicators
- Connection failures
- Upstream service errors
- Resource exhaustion (pool full, disk full, OOM)
- Authentication/authorization failures
Follow the Request ID
A single request's journey:
[14:23:01] API Gateway: request_id=req_abc received, routing to order-service
[14:23:01] Order Service: request_id=req_abc processing, calling payment-service
[14:23:11] Order Service: request_id=req_abc payment-service timeout after 10s
[14:23:11] Order Service: request_id=req_abc returning 500
[14:23:11] API Gateway: request_id=req_abc responded 500 in 10.2sStep 4: Traces → Understand the Flow
Distributed traces show the full request path with timing.
Reading a Trace
[Trace: abc123] Total: 10,245ms
├── API Gateway (2ms)
├── Order Service (10,240ms)
│ ├── Validate Request (3ms)
│ ├── Check Inventory (45ms)
│ │ └── Database Query (42ms)
│ ├── Create Payment (10,180ms) ← THE PROBLEM
│ │ └── Payment Service HTTP Call (10,175ms) ← TIMEOUT
│ └── [Error: upstream timeout]
└── [Status: 500]What Traces Reveal
- Which component is slow (the widest span)
- Whether the issue is in your code or a dependency
- Sequential vs parallel calls (could parallelism help?)
- Retry attempts and their timing
- Where errors originate vs where they're reported
Step 5: Cross-Reference
The power is in combining all three:
METRICS say: order-service error rate is 15%, started at 14:20
LOGS say: "payment-service connection timeout" is the most common error
TRACES say: payment-service HTTP calls are taking 10s+ (normally 200ms)
PAYMENT-SERVICE metrics say: CPU at 98%, latency p99 at 12s since 14:18
PAYMENT-SERVICE logs say: "connection pool exhausted" starting 14:18
DEPLOY LOG says: payment-service deployed at 14:15
ROOT CAUSE: Payment service deployment at 14:15 introduced a connection leak,
causing pool exhaustion, causing timeouts, causing order-service errors.Common Investigation Patterns
"Error rate is up"
→ Which errors? (group by error type/message)
→ Which endpoints? (group by path)
→ Which users? (group by user/region/client)
→ When did it start? (correlate with deploys/changes)
→ Find a sample request_id → read its trace and logs"Latency is up"
→ Which percentile? (p50 vs p99 tells different stories)
→ Which endpoints? (group by path)
→ Is it our code or a dependency? (trace breakdown)
→ Resource saturation? (CPU, memory, connections, disk)
→ Traffic change? (more load = higher latency if at capacity)"Users report intermittent errors"
→ Get a request_id from the user (error page should show it)
→ Trace that specific request
→ Compare with a successful request from the same flow
→ What's different?
→ Check: is it correlated with time, load, region, or specific data?"Something seems wrong but no alerts"
→ Compare current metrics to baseline (yesterday, last week)
→ Check error rate (even small increases matter)
→ Check latency tail (p99 may be degraded while p50 is fine)
→ Check resource utilization trends (growing = eventual problem)
→ Check dependency health (their problem becomes your problem)Building Good Observability
| Practice | Why |
| Request ID on every log line | Trace a single request across all services |
| Structured logging (JSON) | Queryable at scale |
| Deploy markers on dashboards | Correlate issues with changes |
| Span names match code paths | Traces are readable |
| Error logs include context | Diagnose without reproducing |
| Baseline dashboards | Know what "normal" looks like |
Tools Quick Reference
| Need | Tool |
| View traces | Jaeger, Zipkin, Tempo, Datadog APM, Honeycomb |
| Search logs | Loki + Grafana, Elasticsearch + Kibana, CloudWatch, Datadog |
| View metrics | Grafana + Prometheus, Datadog, CloudWatch |
| Correlate all three | Grafana (Tempo + Loki + Prometheus), Datadog, Honeycomb |
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.

