Skip to main content
npm i @bryel/sdk-core @opentelemetry/sdk-trace-base

bryelSpanProcessor

bryelSpanProcessor(options): SpanProcessor
A batching span processor that ships spans to bryel without mapping — for any app already emitting OpenInference/OTel spans. Add it to your provider’s spanProcessors.

buildSpanProcessor

buildSpanProcessor(mapper: SpanMapper, options): SpanProcessor
Like bryelSpanProcessor, but runs a SpanMapper first — promote framework spans into OpenInference before export.

buildExporter

buildExporter(options): SpanExporter
The raw OTLP/HTTP-protobuf exporter pointed at the bryel ingest, with the API key on the Authorization header. Compose it yourself if you need a custom processor.

Options

apiKey
string
required
Project API key (bk_…).
endpoint
string
default:"https://ingest.bryel.ai/v1/traces"
Override for self-hosting.
headers
Record<string, string>
Extra headers, merged after auth.

SpanMapper

name
string
required
Identifier for the mapper.
shouldMap
(span) => boolean
required
Skip spans this mapper doesn’t own.
map
(span) => Attributes
required
OpenInference attributes to merge onto the span (does not mutate).
isTraceRoot
(span) => boolean
Optional. Marks an operation root whose framework parent is dropped, so runs root cleanly.