Skip to content

fix: export TracingConfig, TraceProvider, get_trace_provider, and TraceCtxManager from agents#3494

Closed
adityasingh2400 wants to merge 1 commit into
openai:mainfrom
adityasingh2400:fix/export-trace-provider-and-config
Closed

fix: export TracingConfig, TraceProvider, get_trace_provider, and TraceCtxManager from agents#3494
adityasingh2400 wants to merge 1 commit into
openai:mainfrom
adityasingh2400:fix/export-trace-provider-and-config

Conversation

@adityasingh2400
Copy link
Copy Markdown
Contributor

Four names are present in agents.tracing.__all__ but are not re-exported from the top-level agents module: TracingConfig, TraceProvider, get_trace_provider, and TraceCtxManager. The first is documented as the type to pass via RunConfig.tracing for per-run trace export settings, and get_trace_provider is the natural counterpart to the already-exported set_trace_provider. TraceProvider is the abstract base for custom trace providers, and TraceCtxManager is the context manager used by Runner.run and VoicePipeline.run to manage trace lifecycles, so users wiring their own runners or pipelines need it from the public surface.

This is the same shape as the recent #3489 and #3490 export-gap fixes: every other name in agents.tracing.__all__ already appears in agents.__all__, and these four were the remaining holdouts. The fix adds them to the from .tracing import ... block and to __all__ in src/agents/__init__.py.

A regression test in tests/tracing/test_tracing_exports.py iterates agents.tracing.__all__ and asserts every name is reachable from agents and listed in agents.__all__, so future drift between the two surfaces fails CI. It mirrors the pattern already used in tests/test_exception_exports.py.

…ceCtxManager from agents

These four names appear in agents.tracing.__all__ but were not re-exported from
the top-level agents package. TracingConfig is documented as the value to pass
via RunConfig.tracing, get_trace_provider is the natural counterpart to the
already-exported set_trace_provider, TraceProvider is the abstract base for
custom providers, and TraceCtxManager is used by custom runners and the voice
pipeline. Add a regression test that requires every name in
agents.tracing.__all__ to also be reachable from agents and to appear in
agents.__all__, mirroring tests/test_exception_exports.py.
@seratch
Copy link
Copy Markdown
Member

seratch commented May 22, 2026

Thanks for sharing this change, however we don't intend to have everything in the exports from the top-level.

@seratch seratch closed this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants