Skip to content

Commit 2f01eb7

Browse files
populate hooks variable
1 parent 327a4d8 commit 2f01eb7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • sentry_sdk/integrations/openai_agents/patches

sentry_sdk/integrations/openai_agents/patches/runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ async def wrapper(*args: "Any", **kwargs: "Any") -> "Any":
231231
if hooks is not None:
232232
_patch_run_hooks(hooks=hooks)
233233
else:
234-
kwargs["hooks"] = _SentryRunHooks()
234+
hooks = _SentryRunHooks()
235+
kwargs["hooks"] = hooks
235236

236237
# Isolate each workflow so that when agents are run in asyncio tasks they
237238
# don't touch each other's scopes

0 commit comments

Comments
 (0)