@bryel/sdk-core
v0.1.0
Published
Framework-agnostic SDK core: OTLP exporter, API-key auth, register() primitives, mapping span processor. Knows zero frameworks.
Maintainers
Readme
@bryel/sdk-core
Framework-agnostic core for bryel — LLM & agent tracing. It's an
OpenTelemetry OTLP exporter + span processor, so you can ship traces to bryel from any
OpenTelemetry-instrumented app. On the Vercel AI SDK? Use @bryel/vercel instead.
npm i @bryel/sdk-core @opentelemetry/sdk-trace-baseAny OpenTelemetry / OpenInference app
If your app already emits OpenInference spans (e.g. via an OpenInference instrumentor for OpenAI, Anthropic, or LangChain — or your own instrumentation), add the bryel processor:
import { bryelSpanProcessor } from "@bryel/sdk-core";
// with @vercel/otel
registerOTel({ spanProcessors: [bryelSpanProcessor({ apiKey: process.env.BRYEL_KEY })] });
// or a NodeSDK
new NodeSDK({ spanProcessors: [bryelSpanProcessor({ apiKey: process.env.BRYEL_KEY })] }).start();That's it — spans batch and POST to the bryel ingest with Authorization: Bearer <key>. The
receiver stamps tenant/project from the key; the SDK never sends them.
Custom mapping
If your spans aren't OpenInference yet, supply a SpanMapper (this is exactly what
@bryel/vercel does for the AI SDK):
import { buildSpanProcessor, type SpanMapper } from "@bryel/sdk-core";
const processor = buildSpanProcessor(myMapper, { apiKey: process.env.BRYEL_KEY });Options
{ apiKey, endpoint?, headers? } — endpoint defaults to the bryel SaaS ingest
(https://ingest.bryel.ai/v1/traces); point it at your own ingest for self-hosting.
MIT © bryel
