Skip to main content
Traceloop OpenLLMetry is an observability framework for LLM applications. Braintrust captures the LLM calls, workflows, and application traces that Traceloop instruments and logs them to your Braintrust project.

Setup

This integration uses Braintrust’s Python SDK OpenTelemetry configuration. Install Traceloop alongside the Braintrust SDK, then point it at Braintrust’s OpenTelemetry endpoint.
1

Install the packages

Install Traceloop with the Braintrust SDK’s OpenTelemetry support and the OpenAI client:
2

Configure environment variables

Point Traceloop at Braintrust by setting its base URL and headers:
.env
When setting the bearer token, encode the space between “Bearer” and your API key using %20.

OpenTelemetry

To send traces to Braintrust, initialize Traceloop. It exports spans to the project named in the x-bt-parent header:
traceloop_braintrust.py

Resources