Skip to main content
The shortest path from zero to a Tracelane trace.

Step 1 — Install the CLI

That is everything the hosted path needs. There is no SDK to add and no code to change — Step 3 points your existing OpenAI-compatible client at the gateway and the gateway captures the trace. The @tracelanedev/sdk (TypeScript) and tracelane (Python) packages are a second, optional path — and the one that gives you a nested trace. The gateway records one span per model call; the SDK records the shape of the agent around them (the planner step, each tool call, the summariser) and exports it to https://gateway.tracelane.dev with the same tlane_… key. See TypeScript SDK and Python SDK.

Step 2 — Set two env vars

The API key comes from sign-up at app.tracelane.dev/sign-in — the same route handles first-time sign-up and returning sign-in. The gateway URL only changes for self-host.

Step 3 — Point your client at the gateway

The gateway speaks the OpenAI Chat Completions API. Point any OpenAI-compatible client at the gateway base URL and choose your model by name (claude-…, gpt-…, gemini-…) — we route + capture, no SDK swap.

Step 4 — See the trace

Open the trace viewer at app.tracelane.dev/traces — the call from Step 3 lands within a second. Or render it in the terminal, using a trace id from that list:

Optional — join the trace your app already has

If your app runs OpenTelemetry with HTTP instrumentation (opentelemetry-instrumentation-httpx or -requests in Python, @opentelemetry/instrumentation-http / -fetch in Node), every request it sends to the gateway already carries a W3C traceparent header. The gateway reads it: the gen_ai.chat span it records takes your trace id and is parented to your calling span. What that gives you: one span, correctly parented. If you also send your own spans to Tracelane (see the framework integrations), the gateway span appears under your LLM span in the same trace. If you do not, Tracelane shows the gateway span as the root of a trace that carries your trace id, so you can look it up by the id your own tooling printed. A malformed header is ignored, never an error — the request proceeds and the span gets a fresh trace id with no parent. tracestate is not read; nothing is propagated onward to the provider.

Optional — group turns into a session

A multi-turn conversation is several traces sharing one id. Send it as the x-conversation-id header and /sessions groups them; send nothing and each call is just a standalone trace. On the no-SDK path above, pass the header on the call:

Optional — say who initiated the call

A session tells you these turns belong together. It does not tell you who. Send an end-user id and the /sessions list gains a User column you can click through to every trace from that person. Three ways in, first one wins:
Send an opaque id — a UUID or a hash — not an email address or a phone number. The value is stored on the span, and PII redaction rewrites anything email-, phone- or card-shaped before it is written. [email protected] is stored as [REDACTED:email], and the User column shows “redacted” rather than the address. OpenAI and Anthropic ask the same of their equivalent fields.
Ids longer than 256 characters are dropped rather than truncated — a shortened id is a wrong id — and the request itself always succeeds either way. If you use the SDK, withSession(id, fn) (TypeScript) and use_session(id) (Python) set that header for every call in the scope — see Concepts for the full picture and the id rules.

What you got for free

  • Routing across 205 providers with a single API key, no SDK swap.
  • Low-overhead gateway routing on every call.
  • Full-fidelity OTLP traces — tool calls, retries, predictive verdicts and full run shape. Prompt and completion bodies are not captured by default (see Security).
  • Predictive guardrails running inline (see predictive guardrails).
  • Tamper-evident audit log — a live SHA-256 hash chain and Ed25519 per-tenant signing; anchored batches carry a resolved Sigstore Rekor v2 inclusion proof (best-effort, opt-in), with universal per-run anchoring on the roadmap.

Next