npx skills add ...
npx skills add axiomhq/cli --skill find-traces
Analyze OpenTelemetry distributed traces from Axiom. Use when investigating a trace ID, finding traces by criteria (errors, latency, service), or debugging distributed system issues.
npx skills add axiomhq/cli --skill find-traces
Analyze OpenTelemetry distributed traces to identify errors, latency issues, and root causes.
When invoked with a trace ID (e.g., /find-traces abc123...), it's available as $ARGUMENTS.
First, find trace datasets:
Look for datasets containing trace data (often named *traces*, *spans*, or otel-*).
Always verify field names first:
| Field | Bracket? | Description |
|---|---|---|
trace_id | No | 32-char trace identifier |
span_id | No | 16-char span identifier |
parent_span_id | No | Parent span (empty for root) |
name | No | Operation name |
duration | No | Duration in nanoseconds |
kind | No | CLIENT, SERVER, INTERNAL, PRODUCER, CONSUMER |
error | No | Boolean error flag |
['service.name'] | Yes | Service identifier |
['status.code'] | Yes | OK, ERROR, or nil |
['status.message'] | Yes | Error description |
['scope.name'] | Yes | Instrumentation library |
OTel durations are in nanoseconds:
| Human | Nanoseconds | Filter |
|---|---|---|
| 1 ms | 1,000,000 | duration >= 1000000 |
| 100 ms | 100,000,000 | duration >= 100000000 |
| 1 s | 1,000,000,000 | duration >= 1000000000 |
Convert for display:
Non-standard span attributes are stored in attributes.custom map:
Without tostring(), aggregations fail with "grouping by field of type unknown".
When working in a repository that matches the traced service, correlate trace data with source code to identify root causes.
Extract package/module path from ['scope.name']
github.com/org/repo/pkg/auth → pkg/authFind code from operation name
name field often contains function names or HTTP routesTrace the call chain
Note: Codebase correlation is optional. Proceed with trace-only analysis if code is unavailable or doesn't match the traced services.
When analyzing a trace, provide:
For query syntax, invoke the axiom-apl skill which provides trace analysis patterns and duration unit guidance.