Skip to main content
LangChain and LangGraph are OpenTelemetry-native through the community instrumentors. Tracelane accepts OTLP directly, so you can configure the exporter yourself as shown below. Alternatively, the Python SDK LangGraph integration wires the same instrumentor through auto_instrument(); choose one setup.

What you get

This is the option that captures the agent, not just the model call. If you instead point your OpenAI-compatible client at the Tracelane gateway base URL, you get the LLM leg only — one span per request, no tree. See Which integration should I use?.

Setup

Your API key needs the ingest scope. Mint one in Settings → API keys.
LangChainInstrumentor covers LangGraph too — LangGraph is built on LangChain runnables, so graph nodes come through the same callback system. You do not need a second instrumentor.

What a trace looks like

A two-node LangGraph agent, verified end to end against Tracelane production on 2026-08-31 — 11 spans, 1 root, 10 parented, 0 orphans:
Read back out of Tracelane’s own storage, not asserted from the exporter.

Span volume — read this before you pick a plan

One agent run is many spans. The tree above is 11 spans for one invoke(); a single prompt | model | parser chain is 4. That is the point of the integration — the structure is the product — but it means span volume is not run volume. Plan limits are counted in spans on this path.
An OTel span and a gateway call are not the same unit, and they are not counted the same way. A gateway request and an OTel span both count as ingest bytes against the SAME meter — there is no separate quota for one path or the other. On this OTel path your app sends spans, and one agent run is many spans — the tree above is 11 for a single invoke(). Size your ingest estimate against spans per run, not runs, and see pricing.

Which integration should I use?

They compose: point the gateway at your provider and run the instrumentor, and you get gateway features plus agent structure.
The two paths do not currently join into one trace. A gateway-proxied call does not adopt your agent’s trace context, so it appears as its own single-span trace rather than nesting under the LangGraph run. If you need one tree, use the OTel exporter path alone.