The respan-exporter-braintrust package enables exporting Braintrust log records and spans to Respan for tracing. Maintain your existing Braintrust APIs and workflows while forwarding data to the Respan platform.
The exporter captures parent and child spans with configurable types, input/output data, metrics like token counts, and custom metadata. It works alongside Braintrust's OpenAI wrapper for unified tracing.
Install braintrust and respan-exporter-braintrust. Set the RESPAN_API_KEY and optionally RESPAN_BASE_URL environment variables.
Initialize the exporter with a context manager, create Braintrust loggers normally, then flush to sync data to Respan's Traces dashboard.