bryel ships your model calls, tool calls, tokens, and cost to bryel as
OpenInference traces. One call configures OpenTelemetry; then any
OpenInference instrumentor flows
through — bryel adds no mapping, it’s just the exporter.
1
Install
2
Initialize
BRYEL_KEY) and omit api_key.3
Instrument your stack
Add the OpenInference instrumentor for your library:…or let bryel wire up every instrumentor you have installed:
4
Verify
Run a model call, then open the trace explorer — model, tokens, cost, and
tool calls appear.
Full example
Grouping and feedback
Stampsession.id, user.id, and a bryel.interaction.id you mint onto your
spans to group turns into a conversation and join
feedback.
bryel sends OTLP/HTTP protobuf and needs no client-side mapping — the ingest
normalizes both the OpenInference (
llm.*) and OpenTelemetry GenAI
(gen_ai.*) conventions.Evals
Ship an eval run’s artifacts (screenshot and/or text) for judging — one eval task = onesession_id. See the evals guide for the full flow.
API
bryel.init(api_key=None, *, service_name=None, endpoint=None, headers=None, set_global=True, instrument=False)
Configures the exporter and returns the OpenTelemetry TracerProvider.
str
Project API key (
bk_…). Falls back to $BRYEL_KEY.str
OpenTelemetry
service.name.str
default:"https://ingest.eu.bryel.ai/v1/traces"
OTLP/HTTP URL. Override via
$BRYEL_INGEST_URL for self-hosting.dict
Extra headers, merged after auth.
bool
default:"True"
Register as the global OpenTelemetry provider.
bool
default:"False"
Also auto-instrument installed OpenInference libraries.
bryel.auto_instrument(tracer_provider=None) -> list[str]
Best-effort instrument every installed OpenInference library — provider SDKs,
agent SDKs, and frameworks (see Integrations for the full
list). Returns the ones it wired up; safe to call with none installed.
bryel.shutdown()
Flush pending spans and shut down. Call on process exit.
bryel.start_eval_session(session_id, api_key, *, endpoint=None) -> EvalSession
Bind (api_key, session_id) and return a handle whose export(images=…, output_texts=…) ships the run’s artifacts. See evals.
bryel.export_eval_session(api_key, session_id, *, images=None, output_texts=None, endpoint=None) -> dict
Ship an eval run’s artifacts directly. images are base64 strings; provide images and/or output_texts.