OpenTelemetry
Send per-turn token, cost and quota data from bb to the OpenTelemetry collector you already run. Each finished turn becomes a span with the model, input, output and cache tokens, and cost when the provider reports it; child threads join the trace of their root thread. Histograms and counters track token usage, turn duration, cost, turns and thread transitions, and gauges follow provider quota windows (used percent, reset time). Prompts, replies, tool text, thread titles, file paths and error messages are never exported, and no setting turns that on. Needs an OpenTelemetry collector that you run; nothing is sent until you set its OTLP/HTTP endpoint.
Overview
View sourceWhat you get
- One span for each finished turn, with model, token counts, cache tokens and cost, in GenAI semantic-convention attributes.
- Thread, project and environment ids, plus the project name, on every span. A delegated thread joins the trace of its parent.
- Token, cost, duration and thread-lifecycle metrics.
- Provider quota windows (used percent, reset time) as gauges.
Privacy
The plugin never exports prompts, replies, tool input or output, thread titles, file paths or error messages. There is no setting to turn that on.
Requirements
An OpenTelemetry collector that you run and that accepts OTLP/HTTP.
Set up
Set the OTLP/HTTP endpoint of your collector, and the headers it needs. Nothing is sent until the endpoint is set.
More from lanjak
More in Token Usage & Limits 31
Understand or control token, context-window, and provider-quota use.



