fix: export TracingConfig, TraceProvider, get_trace_provider, and TraceCtxManager from agents#3494
Closed
adityasingh2400 wants to merge 1 commit into
Closed
Conversation
…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.
Member
|
Thanks for sharing this change, however we don't intend to have everything in the exports from the top-level. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four names are present in
agents.tracing.__all__but are not re-exported from the top-levelagentsmodule:TracingConfig,TraceProvider,get_trace_provider, andTraceCtxManager. The first is documented as the type to pass viaRunConfig.tracingfor per-run trace export settings, andget_trace_provideris the natural counterpart to the already-exportedset_trace_provider.TraceProvideris the abstract base for custom trace providers, andTraceCtxManageris the context manager used byRunner.runandVoicePipeline.runto 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 inagents.__all__, and these four were the remaining holdouts. The fix adds them to thefrom .tracing import ...block and to__all__insrc/agents/__init__.py.A regression test in
tests/tracing/test_tracing_exports.pyiteratesagents.tracing.__all__and asserts every name is reachable fromagentsand listed inagents.__all__, so future drift between the two surfaces fails CI. It mirrors the pattern already used intests/test_exception_exports.py.