---
title: "Assemble a unified cross-project span waterfall (Phase 2)."
method: GET
path: "/otel/global/traces/{trace_id}"
tags: ["Traces"]
---

# Assemble a unified cross-project span waterfall (Phase 2).

`GET /otel/global/traces/{trace_id}`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/otel/global/traces/{trace_id}`
- Auth: HTTP bearer

Fans out to every project that holds spans for `trace_id` (up to 20
projects, 10,000 total spans).  Spans are annotated with
`project_id`/`project_name` and sorted by `start_time ASC`.
`truncated: true` signals a hit on either cap; `truncated_projects`
lists the dropped project IDs.  See ADR-027 §4 for the full design.

## Path parameters

- `trace_id` string, required

## Query parameters

- `start_time` string
- `end_time` string

## Response `200`

Unified cross-project trace waterfall

- UnifiedTrace: Merged cross-project trace result (Phase 2 unified waterfall). Spans are sorted by `start_time ASC`. At most 20 projects and 10,000 spans total are included; `truncated` / `truncated_projects` signal when the caps were hit.
  - `end_time` string, date-time, required
  - `error_count` integer, required
  - `has_redacted_spans` boolean, required: `true` when at least one project has `cross_project_trace_sharing = false` and its spans were therefore excluded from the result set.
  - `projects` ProjectRef[], required: Projects that contributed spans to this result set.
    - `project_id` integer, required
    - `project_name` string, required
    - `project_slug` string, required: URL slug used to link a span back into its owning project's trace view.
  - `span_count` integer, required
  - `spans` AnnotatedSpan[], required: Annotated, merged span list sorted by `start_time ASC`.
    - `project_id` integer, required: The project that stored this span (same as `span.project_id`).
    - `project_name` string, required: Human-readable project name for waterfall colour-coding and legend.
    - `span` SpanRecord, required: Original span data verbatim from storage.
      - `attributes` object, required: Raw key/value pairs exactly as reported by the instrumenting library. Numeric values are NOT guaranteed to share `duration_ms`'s unit — they may be seconds, milliseconds, microseconds, or nanoseconds depending on the exporter's own convention, and the unit is not labeled here.
      - `deployment_id` integer, nullable
      - `duration_ms` number, double, required: Span duration in milliseconds. The only field on this struct guaranteed to be in milliseconds.
      - `end_time` string, date-time, required
      - `events` SpanEvent[], required
        - `attributes` object, required
        - `name` string, required
        - `timestamp` string, date-time, required
      - `kind` 'UNSPECIFIED' | 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER', required: Span kind.
      - `name` string, required
      - `parent_span_id` string, nullable
      - `project_id` integer, required
      - `resource` ResourceInfo, required: Resource attributes extracted from OTel resource descriptors.
        - `attributes` object, required
        - `deployment_environment` string, nullable
        - `service_name` string, required
        - `service_version` string, nullable
      - `span_id` string, required
      - `start_time` string, date-time, required
      - `status_code` 'UNSET' | 'OK' | 'ERROR', required: Span status code.
      - `status_message` string, required
      - `trace_id` string, required
  - `start_time` string, date-time, required
  - `total_duration_ms` number, double, required: Trace wall-clock duration in milliseconds (`end_time – start_time`).
  - `trace_id` string, required
  - `truncated` boolean, required: `true` when the 20-project or 10,000-span cap was hit.
  - `truncated_projects` integer[], required: project_ids excluded due to truncation (most-recent first_seen dropped first).

## Other responses

- `400`: trace_id is not 32 lowercase hex characters
- `401`: Unauthorized
- `403`: Insufficient permissions or deployment token
- `500`: Internal server error

## Changes

- **2026-11-09** `12896146b193`: 4 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `500` status
- **2026-10-05** `4b228ebed583`: 6 info
  - added the new optional `query` request parameter `end_time`
  - added the new optional `query` request parameter `start_time`
  - added the optional property `status` to the response with the `400` status
  - added the optional property `status` to the response with the `401` status
  - …2 more
- **2026-10-05** `63a80791dc58`: 6 warning
  - deleted the `query` request parameter `end_time`
  - deleted the `query` request parameter `start_time`
  - removed the optional property `status` from the response with the `400` status
  - removed the optional property `status` from the response with the `401` status
  - …2 more
- **2026-09-23** `f4efc4d5c7b7`: 4 info
  - added the optional property `status` to the response with the `400` status
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
  - added the optional property `status` to the response with the `500` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/otel/global/traces/:trace_id/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
