Install
createBryelTracer
Tracer to pass into the AI SDK’s experimental_telemetry.tracer. No global registration — build it where you trace, so there is no app-boot cost.
registerBryelBrowser
experimental_telemetry: { isEnabled: true } (without a tracer) routes through bryel. Returns the provider so you can forceFlush() / shutdown() on unload.
Options
Both functions take the same options.A publishable key (
bkp_…) — write-only and origin-locked. Never a secret bk_ key; a browser bundle is public.OTLP/HTTP traces endpoint. Override for self-hosting.
OpenTelemetry
service.name stamped on the resource.Extra headers, merged after the auth header.
Telemetry metadata
The samemetadata fields as the server SDK group and join your data:
Groups multiple calls into one conversation.
The end user behind the run.
The browser SDK reuses the
@bryel/vercel mapper, so a browser-emitted span lands in bryel identically to a server one.