We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cfbf3a9 commit 5938849Copy full SHA for 5938849
1 file changed
sentry_sdk/integrations/openai_agents/patches/runner.py
@@ -87,7 +87,9 @@ def _create_run_streamed_wrapper(
87
original_func: "Callable[..., Any]",
88
) -> "Callable[..., Any]":
89
"""
90
- Wraps the agents.Runner.run_streamed method to create a root span for streaming agent workflow runs.
+ Wraps the agents.Runner.run_streamed method to
91
+ - create a root span for streaming agent workflow runs.
92
+ - end the workflow span if and only if the response stream is consumed or cancelled.
93
94
Unlike run(), run_streamed() returns immediately with a RunResultStreaming object
95
while execution continues in a background task. The workflow span must stay open
0 commit comments