-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Gap
BraintrustTracingProcessor — the fully implemented tracing integration for the OpenAI Agents SDK — is not registered by auto_instrument(). Every other supported integration (OpenAI, Anthropic, LiteLLM, Pydantic AI, Google GenAI, Agno, Claude Agent SDK, DSPy, ADK) is wired into auto_instrument(), but users of the OpenAI Agents SDK must manually call set_trace_processors():
from agents import set_trace_processors
from braintrust.wrappers.openai import BraintrustTracingProcessor
set_trace_processors([BraintrustTracingProcessor()])This is inconsistent with the documented one-line auto-instrumentation pattern and means users who rely on braintrust.auto_instrument() silently get zero tracing for agent runs.
What is missing
auto_instrument() should include an openai_agents: bool = True parameter (or fold it into the existing openai flag) that calls set_trace_processors([BraintrustTracingProcessor()]) when the openai-agents package is installed.
The processor implementation is complete — it handles all 11 span data types, token usage, TTFT metrics, and nested span contexts. Only the auto-registration wiring is missing.
Braintrust docs status
supported — the OpenAI Agents SDK integration page documents the integration and shows auto_instrument() as the recommended setup path, but the Python SDK does not actually register the processor via that path.
Upstream sources
- OpenAI Agents SDK tracing docs: https://openai.github.io/openai-agents-python/tracing/
agents.tracing.set_trace_processors()is the SDK's registration APIagents.tracing.TracingProcessoris the interface thatBraintrustTracingProcessorimplements
Local files inspected
py/src/braintrust/auto.py—auto_instrument()(lines 29–126) has no reference toopenai-agents,TracingProcessor,set_trace_processors, orBraintrustTracingProcessorpy/src/braintrust/wrappers/openai.py—BraintrustTracingProcessoris fully implemented, handles all span typespy/src/braintrust/wrappers/test_openai.py— 4 test functions exist (one skipped), all manually register the processorpy/setup.pyline 33 —openai-agentsis declared as an optional dependency underextras_require["openai-agents"]