Setup
This integration uses Braintrust’s Python SDK OpenTelemetry configuration. Install Traceloop alongside the Braintrust SDK with OpenTelemetry support and the OpenAI client:.env
When setting the bearer token, encode the space between “Bearer” and your API key using
%20.Trace with TraceLoop
Initialize TraceLoop and your traces will automatically be sent to the Braintrust project specified in thex-bt-parent header:
traceloop_braintrust.py