Sessions
Read a turn's trace
GET
The turn's spans as OTLP/HTTP JSON (resourceSpans), as the Runtime posts them to an OTLP collector: a root span for the turn, a span for each model, tool and egress crossing, ids derived so every read agrees. Post it to a collector's /v1/traces to backfill. A turn still running has no root span yet; a turn the session never had has no spans.
applicationKeyheader
AuthorizationBearer <token>An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).
sessionId*stringturnId*stringNylorun-Protocol*stringThe protocol version, 18
The turn's spans
application/json- response
resourceSpans*array<>[key: string]?unknownimport { createClient } from "@nylorun/agents";const client = await createClient();const trace = await client.session("ses_123").trace("turn_123");{ "resourceSpans": [ { "resource": { "attributes": [ { "key": "string", "value": { "property1": null, "property2": null }, "property1": null, "property2": null } ], "property1": null, "property2": null }, "scopeSpans": [ { "scope": { "name": "string", "version": "string", "property1": null, "property2": null }, "spans": [ { "traceId": "string", "spanId": "string", "parentSpanId": "string", "name": "string", "kind": 0, "startTimeUnixNano": "string", "endTimeUnixNano": "string", "attributes": [ { "key": "string", "value": { "property1": null, "property2": null }, "property1": null, "property2": null } ], "status": { "code": 0, "message": "string", "property1": null, "property2": null }, "property1": null, "property2": null } ], "property1": null, "property2": null } ], "property1": null, "property2": null } ], "property1": null, "property2": null}