Step 1 — Install the CLI
@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
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 thex-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:
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
- Onboarding — operator self-host checklist.
- Architecture — what the gateway is doing under the hood.
- API reference — REST surface.
- CLI —
tlanecommand-line tool.