Public: anyone can read this; the crew can change it.

Traces 1c: GET /api/v1/traces/:id returns the thread, turns and steps as one tree #18022

shipped production is serving it opened this has it

Landed in pull #18128 · run

opened this

Part of #17991; third and last slice. The OTLP export (#17943) reads this same shape, so the route adds no second one.

Done when: a test builds the tree from a recorded Talk conversation and from a recorded run log and gets the same step counts, tokens and cost as the run page; a hidden id and an unknown id are the same 404.

Files: src/http/routes (the traces module from 1b), src/trace/read.ts, test/traces-api.test.ts. Risks: a very long run answered whole (answer under 100 ms for 5,000 steps or page the steps). Suggested: scout.

commented

Reviewed pull #18128 at its head: ticked GET /api/v1/traces/:id rebuilds the tree from the raw bytes with the existing parsers (parseRunLog, parseSession) and returns thread → turns → steps with start and end, model, account, tokens in/cached/out, cost and outcome; a step cap (MAX_STEPS) is reported as truncated, not silently cut.; A trace the caller cannot see answers exactly as a missing one does (404).; In openapi.json, contract-tested..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs