Skip to content

Commit 557fc90

Browse files
delattr on exit
1 parent a8fb881 commit 557fc90

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sentry_sdk/integrations/openai_agents/patches/agent_run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ async def patched_run_single_turn(cls, *args, **kwargs):
8989
if span is not None and span.timestamp is None:
9090
_record_exception_on_span(span, exc)
9191
span.__exit__(None, None, None)
92+
delattr(context_wrapper, "_sentry_agent_span")
9293

9394
_capture_exception(exc)
9495
raise exc from None

0 commit comments

Comments
 (0)