Why this page is different. As of
ai@7, generateText emits no OpenTelemetry spans
by itself — the package has no @opentelemetry/api dependency. Passing
experimental_telemetry: { isEnabled: true } alone gets you nothing. The AI SDK instead
exposes registerTelemetry(), and tracelaneTelemetry() maps it onto OpenTelemetry.What you get
Setup
ingest scope. Mint one in Settings → API keys.
What a trace looks like
A two-step tool-calling run, verified end to end against Tracelane production on 2026-08-31 — 6 spans, 1 root, 5 parented, 0 orphans, read back from storage:Span volume
The alternative: the gateway base URL
If you only need the model call and want routing, BYOK, guardrails, caching and budgets, point the SDK’s provider at the Tracelane gateway instead:
They compose: run both and you get gateway features plus agent structure. Note the two do
not currently join into a single trace — a gateway-proxied call does not adopt your agent’s
trace context, so it appears as its own single-span trace.
Earlier releases exported
instrumentVercelAI(ai). It never worked — it mutated the
imported ai module object, and ES module namespaces are read-only. It now throws an
error naming this replacement.