@bryel/vercel
v0.1.2
Published
Vercel AI SDK adapter — maps experimental_telemetry spans to the OpenInference convention. The ONLY place 'vercel' appears. No @arizeai dependency.
Maintainers
Readme
@bryel/vercel
bryel tracing for the Vercel AI SDK. One span processor + a per-call flag — no wrapping of your model calls.
npm i @bryel/vercel @vercel/otel1. Register the processor once — instrumentation.ts
import { registerOTel } from "@vercel/otel";
import { bryelVercelProcessor } from "@bryel/vercel";
export function register() {
registerOTel({
serviceName: "my-app",
spanProcessors: [bryelVercelProcessor({ apiKey: process.env.BRYEL_KEY! })],
});
}2. Flip telemetry per call
const result = streamText({
model: openai("gpt-4o"),
prompt,
experimental_telemetry: {
isEnabled: true,
metadata: { sessionId, userId }, // groups a conversation in bryel
},
});The AI SDK's OpenTelemetry spans are mapped to OpenInference and shipped to bryel —
models, tokens, cost, tool calls, the whole multi-step trajectory. To attach user feedback to
a turn, mint a messageId, pass it in metadata, and use
@bryel/feedback.
A streamed span finalizes only once the stream is fully consumed — always drain it.
MIT © bryel
