Przejdź do treści
Biblioteka skilli
DevOps i chmura · Analiza

find-traces

/find-traces

Analizuje rozproszone ślady OpenTelemetry z Axiom, szukając po identyfikatorze, błędach, opóźnieniach lub usłudze przy debugowaniu systemów rozproszonych.

Repozytorium
cli ↗
Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Analizuje rozproszone ślady OpenTelemetry z Axiom, szukając po identyfikatorze, błędach, opóźnieniach lub usłudze przy debugowaniu systemów rozproszonych.

Oryginalny opis (EN)

Analyze OpenTelemetry distributed traces from Axiom. Use when investigating a trace ID, finding traces by criteria (errors, latency, service), or debugging distributed system issues.

Jak działa

  1. Arguments
  2. Trace Dataset Discovery
  3. Schema Discovery
  4. Common Operations
  5. OTel Field Reference
  6. Duration Conversion
  7. Custom Attributes
  8. Codebase Correlation
  9. Output Format
  10. When NOT to Use
Sekcje z nagłówków SKILL.md, w oryginale · 217 linii, 832 słów
Podgląd SKILL.md
---
name: find-traces
description: Analyze OpenTelemetry distributed traces from Axiom. Use when investigating a trace ID, finding traces by criteria (errors, latency, service), or debugging distributed system issues.
compatibility: Requires authenticated Axiom CLI (axiom)
user-invocable: true
context: fork
allowed-tools: Bash(axiom query *), Bash(axiom dataset list), Bash(axiom dataset list *), Bash(axiom config get *), Read, Grep, Glob
---

# Trace Analysis

Analyze OpenTelemetry distributed traces to identify errors, latency issues, and root causes.

## Arguments

When invoked with a trace ID (e.g., `/find-traces abc123...`), it's available as `$ARGUMENTS`.

## Trace Dataset Discovery

First, find trace datasets:

```bash
axiom dataset list -f json
```

Look for datasets containing trace data (often named `*traces*`, `*spans*`, or `otel-*`).

## Schema Discovery

**Always verify field names first:**

```bash
axiom query "['<trace-dataset>'] | getschema" --start-time -1h
```

## Common Operations

### Get Trace by ID

```bash
axiom query "['<dataset>']
| where trace_id == '<TRACE_ID>'
| sort by _time asc
| limit 100" --start-time -1h -f json
```

### Find Error Traces

```bash
axiom query "['<dataset>']
| where _time >= ago(1h)
| where error == true
| extend error = coalesce(ensure_field(\"error\", typeof(bool)), false)
| summarize
    start_time = min(_time),
    total_duration = max(duration),
    span_count = count(),
    error_count = countif(error),
    services = make_set(['service.name']),
    root_operation = arg_min(_time, name)
  by trace_id
| sort by start_time desc
| limit 20" --start-time -1h -f json
```

### Find Slow Traces

```bash
axiom query "['<dataset>']
| where _time >= ago(1h)
| where duration >= 1000000000
| summarize
    start_time = min(_time),
    total_duration = max(duration),
    span_count = count(),
    services = make_set(['service.name'])
  by trace_id
| sort by total_duration desc
| limit 20" --start-time -1h -f json
```

### Find Traces by Service

```bash
axiom query "['<dataset>']
| where _time >= ago(1h)
| where ['service.name'] == '<SERVICE>'
| summarize
    start_time = min(_time),
    total_duration = max(duration),
    span_count = count(),
    error_count = countif(error == true)
  by trace_id
| sort by start_time desc
| limit 20" --start-time -1h -f json
```

### Error Spans in Trace

```bash
axiom query "['<dataset>']
| where trace_id == '<TRACE_ID>'
| where error == true
| project _time, ['service.name'], name, duration, ['status.message']" --start-time -1h -f json
```

### Critical Path Analysis

```bash
axiom query "['<dataset>']
| where trace_id == '<TRACE_ID>'
| project span_id, parent_span_id, ['service.name'], name, duration, error
| sort by duration desc" --start-time -1h -f json
```

## OTel Field Reference

| 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 |

## Duration Conversion

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:
```apl
| extend duration_ms = duration / 1000000.0
```

## Custom Attributes

Non-standard span attributes are stored in `attributes.custom` map:

```apl
// Filter by custom attribute
| where ['attributes.custom']['user_id'] == "123"

// Aggregation requires explicit cast
| summarize count() by tostring(['attributes.custom']['tenant'])
```

Without `tostring()`, aggregations fail with "grouping by field of type unknown".

## Codebase Correlation

When working in a repository that matches the traced service, correlate trace data with source code to identify root causes.

### Mapping Trace Data to Code

1. **Extract package/module path from `['scope.name']`**
   - Contains the instrumentation library or package path
   - Strip the module prefix to get the local path
   - Example: `github.com/org/repo/pkg/auth` → `pkg/auth`

2. **Find code from operation name**
   - The `name` field often contains function names or HTTP routes
   - Search the codebase for matching handlers, functions, or endpoints

3. **Trace the call chain**
   - Follow parent-child span relationships
   - Map each span to its corresponding code location
   - Identify where errors originate and propagate

**Note:** Codebase correlation is optional. Proceed with trace-only analysis if code is unavailable or doesn't match the traced services.

## Output Format

When analyzing a trace, provide:

```markdown
## Trace Summary
- **Trace ID:** <id>
- **Duration:** <human-readable>
- **Services:** <list>
- **Outcome:** success/failure

## Sequence of Events
1. <Service> - <operation> (<duration>)
2. <Service> - <operation> (<duration>) ⚠️ ERROR
...

## Error Analysis
<What failed, when, why>

## Root Cause
<Deepest error and explanation>

## Codebase Locations (if applicable)
- **Service:** <service.name>
- **Package:** <scope.name>
- **Files:** <specific files to investigate>

## Recommended Actions
1. <Specific action>
2. <What to investigate next>
```

## When NOT to Use

- **Metrics analysis**: Traces are for request flow; use logs/metrics skills for aggregated performance data
- **Non-OTel data**: This skill assumes OpenTelemetry field conventions (trace_id, span_id, etc.)
- **Known trace structure**: If you already have the query, run it directly without invoking this skill
- **Alerting on trace patterns**: Use Axiom Monitors for continuous alerting

## APL Reference

For query syntax, invoke the `axiom-apl` skill which provides trace analysis patterns and duration unit guidance.

Wersje

RepozytoriumWynikLicencja
Ta strona · axiomhq/cli100MIT
langwatch/langwatch100Apache-2.0

Migawka bazy z 28.10.2026 · wersja paczki 669387690f12 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100opentelemetry
    Wprowadza OpenTelemetry, niezależny od dostawcy framework obserwowalności systemów rozproszonych: ślady, metryki i logi ze standardową instrumentacją i eksporterami, w tym Jaeger i Prometheus.
  • 100trace-analytics
    Bada trace'y i spany rozproszone w OpenSearch: wolne spany, spany z błędami, wywołania agentów, zużycie tokenów, drzewa trace'ów i mapy usług.
  • 100cloud-trace-querying
    Odpytuje spany Cloud Trace, filtruje po opóźnieniach i błędach, koreluje ślady z Cloud Logging i diagnozuje wąskie gardła opóźnień w usługach Google Cloud.
  • 100jaeger
    Zbiera, przechowuje i wizualizuje rozproszone ślady w Jaeger v2, aby śledzić żądania w mikroserwisach i znajdować wąskie gardła opóźnień, z OpenTelemetry, Elasticsearch lub OpenSearch i samplingiem.
  • 90linking-errors-to-traces
    Łączy błąd lub błędy sesji z PostHog ze śladami OpenTelemetry, logami o tym samym trace ID i Session Replay, na podstawie UUID wystąpienia, ID sesji lub adresu issue.
  • 100dt-obs-tracing
    Analizuje rozproszone ślady, spany, zależności usług i przepływ żądań w Dynatrace przy szukaniu błędów, wąskich gardeł wydajności i korelacji śladów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.