Vercel AI SDK
One processor + a per-call flag.
Any OTel app
Ship spans you already emit.
Provider SDKs
OpenAI / Anthropic / LangChain.
Vercel AI SDK
@bryel/vercel maps the AI SDK’s OpenTelemetry spans into OpenInference and ships
them to bryel. You never wrap your model calls.
Register the processor once
In
instrumentation.ts — Next.js calls this on startup.instrumentation.ts
Any OpenTelemetry app
If your app already emits OpenInference spans, addbryelSpanProcessor to your provider — no mapping.
SpanMapper (this is exactly
what @bryel/vercel does):
Provider SDKs
Calling OpenAI / Anthropic / LangChain directly? Add any OpenTelemetry instrumentation that emits GenAI spans, then ship them withbryelSpanProcessor
— no call-site changes:
Grouping and feedback
Themetadata you pass groups and joins your data:
Groups turns into one conversation.
The end user behind the run.
A per-turn id you mint (
crypto.randomUUID()). bryel stamps it as
bryel.interaction.id so feedback joins back to the turn.API
Project API key (
bk_…).OTLP/HTTP endpoint. Override for self-hosting.
Extra headers, merged after auth.
bryelVercelProcessor (AI SDK, with mapping), bryelSpanProcessor (no mapping),
and buildSpanProcessor(mapper, options) (custom mapping) all take these options
and return an OTel SpanProcessor.