File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
sentry_sdk/integrations/openai_agents Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1+ from sentry_sdk .integrations import DidNotEnable
2+
3+ from .spans import handoff_span
4+
5+
6+ try :
7+ import agents
8+ except ImportError :
9+ raise DidNotEnable ("OpenAI Agents not installed" )
10+
11+
12+ class SentryRunHooks (agents .RunHooks ): # type: ignore[misc]
13+ async def on_handoff (
14+ self ,
15+ context : agents .RunContextWrapper ,
16+ from_agent : agents .Agent ,
17+ to_agent : agents .Agent ,
18+ ) -> None :
19+ handoff_span (context , from_agent , to_agent )
Original file line number Diff line number Diff line change @@ -176,9 +176,6 @@ def _wrap_hooks(hooks):
176176 enable our SentryRunHooks or if the users has given custom RunHooks wrap
177177 them so the Sentry hooks and the users hooks are both called
178178 """
179- import ipdb
180-
181- ipdb .set_trace ()
182179 from .run_hooks import SentryRunHooks
183180
184181 sentry_hooks = SentryRunHooks ()
You can’t perform that action at this time.
0 commit comments