Skip to content

Commit e6e40b1

Browse files
access correct attribute
1 parent baa1b59 commit e6e40b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/openai_agents/patches/agent_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def patched_run_single_turn(cls, *args, **kwargs):
7171
context_wrapper = kwargs.get("context_wrapper")
7272
should_run_agent_start_hooks = kwargs.get("should_run_agent_start_hooks")
7373

74-
span = getattr(context_wrapper, "_sentry_current_agent", None)
74+
span = getattr(context_wrapper, "_sentry_agent_span", None)
7575
# Start agent span when agent starts (but only once per agent)
7676
if should_run_agent_start_hooks and agent and context_wrapper:
7777
# End any existing span for a different agent

0 commit comments

Comments
 (0)