---
title: "Retrieve run trace"
method: GET
path: "/api/v1/runs/{runId}/trace"
tags: ["runs"]
---

# Retrieve run trace

`GET /api/v1/runs/{runId}/trace`

Returns the full OTel trace tree for a run, including all spans and their children.

## Response `200`

Successful request

- object
  - `trace` object
    - `traceId` string — The OTel trace ID.
    - `rootSpan` SpanDetailedSummary
      - `id` string — The span ID.
      - `parentId` string, nullable — The parent span ID, if any.
      - `runId` string — The run ID this span belongs to.
      - `data` object
        - `message` string — The span message.
        - `taskSlug` string — The task identifier, if applicable.
        - `startTime` string, date-time — The start time of the span.
        - `duration` number — The duration of the span in nanoseconds.
        - `isError` boolean
        - `isPartial` boolean
        - `isCancelled` boolean
        - `level` 'TRACE' | 'DEBUG' | 'LOG' | 'INFO' | 'WARN' | 'ERROR'
        - `attemptNumber` number, nullable
        - `properties` object — Arbitrary OTel attributes attached to the span.
        - `events` object[] — Span events (e.g. exceptions, cancellations) that occurred during this span.
          - `name` string — The event name (e.g. "exception", "cancellation", "attempt_failed").
          - `time` string, date-time — The time the event occurred.
          - `properties` object — Event-specific properties.
      - `children` SpanDetailedSummary[] — Nested child spans. Each child has the same structure as the parent span.

## Other responses

- `401` — Unauthorized request
- `404` — Resource not found

---

[API](https://skmtc.net/winsenlabs/apis/trigger-dev-v3-rest-api.md) · [All operations](https://skmtc.net/winsenlabs/apis/trigger-dev-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/winsenlabs/trigger-dev-v3-rest-api/versions/737c498e605b/schema)
