Skip to main content
bryel is OpenTelemetry-native. On the server you have three ways in, all shipping the same OpenInference traces — models, tokens, cost, tool calls, full trajectory.

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.
1

Install

2

Register the processor once

In instrumentation.ts — Next.js calls this on startup.
instrumentation.ts
3

Enable telemetry per call

A streamed span finalizes only once the stream is fully consumed — always drain it.

Any OpenTelemetry app

If your app already emits OpenInference spans, add bryelSpanProcessor to your provider — no mapping.
If your spans aren’t OpenInference yet, supply a 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 with bryelSpanProcessor — no call-site changes:

Grouping and feedback

The metadata you pass groups and joins your data:
string
Groups turns into one conversation.
string
The end user behind the run.
string
A per-turn id you mint (crypto.randomUUID()). bryel stamps it as bryel.interaction.id so feedback joins back to the turn.

API

string
required
Project API key (bk_…).
string
default:"https://ingest.eu.bryel.ai/v1/traces"
OTLP/HTTP endpoint. Override for self-hosting.
Record<string, string>
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.