analyze-traces
Analyze OpenTelemetry traces and structured logs from a running autotel service to debug errors, investigate latency, follow requests across services, and…
Skill by jagreehal
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jagreehal-analyze-traces
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/analyze-traces
What's inside
- Skill name
analyze-traces- Description
- Analyze OpenTelemetry traces and structured logs from a running autotel service to debug errors, investigate latency, follow requests across services, and surface cardinality / attribute hygiene problems. Works with traces from any OTLP backend (Honeycomb, Grafana Tempo, Datadog, Jaeger, Sentry, Axiom, HyperDX, …) plus the local `.autotel/spans/` dump and `InMemorySpanExporter` in tests.
- License
- Apache-2.0
- Instructions
- 201 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Analyze traces
This skill teaches an AI assistant how to read and reason about OpenTelemetry traces produced by autotel. Whether they're sitting in a backend, exported to a local JSON dump, or captured in a test.
## When to use
- Debugging a failing endpoint after deploy
- Investigating latency regressions (p50 / p95 / p99 spike)
- Following a single request across browser → server → queue → worker
- Auditing attribute hygiene (cardinality, PII leak risk, noise)
- Spot-checking that a new instrumentation actually produces the spans you expected
## Input formats
| Source | How to access |
| ------------------------------ | ------------------------------------------------------------------ |
| Local debug dump | `.autotel/spans/*.ndjson`: one span per line, OTLP JSON shape |
| `InMemorySpanExporter` (tests) | `exporter.getFinishedSpans()` |
| Backend (interactive) | Jaeger / Tempo / Honeycomb UI; Datadog Trace Search; etc. |
| Backend (programmatic) | Honeycomb Query API, Tempo `/api/search`, Datadog Logs / Trace API |
## The shape of an autotel span
```json
{
"name": "POST /api/checkout",
"context": { "traceId": "…", "spanId": "…" },
"parentSpanId": "…",
"kind": "SERVER",
"startTimeUnixNano": "…",
"endTimeUnixNano": "…",
"status": { "code": "OK" },
"attributes": {
"service.name": "checkout",
"http.request.method": "POST",
"url.full": "https://api.example.com/api/checkout",
"http.response.status_code": 200,
"user.id": "usr_123",
"user.plan": "enterprise",
"cart.items": 3,
"cart.total": 14999,
"_correlationId": "01J…"
},
"events": [
{
"name": "log.emit.manual",
"attributes": { "level": "info", "stage": "validated" }
}
],
"links": [],
"resource": {
"service.name": "checkout",
"deploy.id": "v2025.05.04-1"
}
}
```
Key conventions to recognise:
- `service.name` distinguishes services in a multi-service trace.
- `_correlationId` (autotel-specific) is stable within a logical unit of work even across forked child spans (`_parentCorrelationId` ties them).
- `gen_ai.*` attributes follow OpenTelemetry gen-ai semantic conventions for LLM calls.
- `exception.*` attributes (auto-set by `createStructuredError`) carry `type`, `message`, `stacktrace`.
## Common investigations
### "Why is endpoint X failing?"
1. Find the trace: filter `service.name = "<svc>" AND http.route = "<route>" AND status = error` for the last hour.
2. Open the slowest / latest matching trace.
3. Inspect the root span's `exception.message` and `exception.stacktrace`.
4. Walk down the child spans: the deepest span with `status.code = ERROR` is usually the culprit.
5. If using `createStructuredError`, look for `code`, `why`, `internal.*` attributes. They usually answer the "why" without you reading code.
### "Why is endpoint X slow?"
1. Find a slow trace: `service.name = "<svc>" AND http.route = "<route>" AND duration > p99(duration)`.
2. View the waterfall: pinpoint the longest child span by self-time (not wall time).
3. Common offenders:
- **Sequential awaits that should be parallel**: sibling spans run end-to-end instead of overlapping.
- **N+1 queries**: many short same-named spans (`SELECT * FROM …`) under one parent.
- **Cold starts**: `faas.coldstart=true` in Workers or Lambda.
- **Tool retries**: gen-ai spans with `gen_ai.response.finish_reasons` containing `error` followed by another call.
### "Which requests are affected?"
A waterfall explains one slow request. It cannot tell you what the slow ones
share. Run the core analysis loop instead: split the population on the symptom,
then score every recorded field by how much the two groups disagree.
```typescript
import { compareCohorts } from 'autotel/analysis';
const isSlow = (event) => Number(event['checkout.duration_ms']) >= 800;
const ranked = compareCohorts({
outlier: events.filter(isSlow),
baseline: events.filter((event) => !isSlow(event)),
});
// [{ field: 'payment.provider', value: 'bank-beta', difference: 0.67, … }]
```
Feed it any array of flat records: `span.attributes` from a collector, wide
events from `getRequestLogger()`, or rows returned by a backend query.
The loop skips fields whose values never repeat. A request id takes a fresh
value on every event, so it would bury the answer under noise. Bucket durations
and payload sizes when you instrument them if you want the loop to rank them.
The top row is a hypothesis. A field can move with the problem without causing
it. You are done when you have named the cohort and confirmed the mechanism in
two traces drawn from it.
### "Follow this user across services"
Use `_correlationId` (or `user.id` if you have it):
```
service.name in (web, api, worker) AND _correlationId = "01J…"From jagreehal/autotel, Apache-2.0.
More from jagreehal/autotel
- 0.631score
find-observability-gaps
jagreehal
Scores the observability of every entry point in a codebase with `autotel map` and closes the gaps it reports.
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
build-audit-trails
jagreehal
Build or review tamper-aware audit trails on top of OpenTelemetry spans using autotel and the autotel-audit package (`withAudit`, `setAuditAttributes`…
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-testing
jagreehal
Test autotel instrumentation with createTraceCollector() and InMemorySpanExporter.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-core
jagreehal
Explains when to reach for trace vs span vs request logger vs events in Autotel, and the package exports each lives behind.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
migrate-to-autotel
jagreehal
Migrate an existing observability setup to autotel.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
production-observability
jagreehal
Takes a Node.js or TypeScript service to production-grade observability with autotel, in an existing codebase or a new one, and keeps it there.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
design-alertable-metrics
jagreehal
Designs metrics an alarm can actually be written against — picking the attributes that let a rule isolate one failing dependency, pinning metric names as a…
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-anti-patterns
jagreehal
Common autotel mistakes and how to fix them.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-framework-setup
jagreehal
Set up autotel in Hono, Fastify, TanStack Start, Cloudflare Workers, Next.js, Express, MCP, and edge runtimes.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-request-logging
jagreehal
Accumulates request-scoped context and emits one wide-event snapshot per request with getRequestLogger(), set(), setLevel(), info/warn/error, and emitNow().
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-structured-errors
jagreehal
Throws and parses errors that explain themselves with message, why, fix, link, and status, including reusable catalogs via defineErrorCatalog.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
debug-missing-spans
jagreehal
Troubleshoot when expected OpenTelemetry spans don't reach the backend.
SkillAFreshness: A★ 8Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 8
- Forks
- 3
- Open issues
- 0
- Last commit (this folder)
- Jul 29, 2026 (3 months ago)
- Last release
- Sep 27, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/jagreehal/autotel
- Website
- jagreehal.github.io/autotel/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jagreehal
- 0.631score
build-audit-trails
jagreehal
Build or review tamper-aware audit trails on top of OpenTelemetry spans using autotel and the autotel-audit package (`withAudit`, `setAuditAttributes`…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
find-observability-gaps
jagreehal
Scores the observability of every entry point in a codebase with `autotel map` and closes the gaps it reports.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-investigate
jagreehal
Query OpenTelemetry telemetry (traces, metrics, logs, LLM analytics) via the autotel CLI.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-core
jagreehal
Explains when to reach for trace vs span vs request logger vs events in Autotel, and the package exports each lives behind.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-testing
jagreehal
Test autotel instrumentation with createTraceCollector() and InMemorySpanExporter.
SkillAFreshness: A★ 8Claude Code +9 - 0.626score
autotel-anti-patterns
jagreehal
Common autotel mistakes and how to fix them.
SkillAFreshness: A★ 8Claude Code +9
Cite this page
analyze-traces skill. Agent Mart. https://agentmart.dev/skills/jagreehal-analyze-traces (last updated 2026-10-24)