We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8d396b commit 720db06Copy full SHA for 720db06
sentry_sdk/integrations/openai_agents/patches/agent_run.py
@@ -8,6 +8,8 @@
8
if TYPE_CHECKING:
9
from typing import Any, Optional
10
11
+ from sentry_sdk.tracing import Span
12
+
13
try:
14
import agents
15
except ImportError:
@@ -27,7 +29,7 @@ def _patch_agent_run():
27
29
original_execute_final_output = agents._run_impl.RunImpl.execute_final_output
28
30
31
def _start_invoke_agent_span(context_wrapper, agent, kwargs):
- # type: (agents.RunContextWrapper, agents.Agent, dict[str, Any]) -> None
32
+ # type: (agents.RunContextWrapper, agents.Agent, dict[str, Any]) -> Span
33
"""Start an agent invocation span"""
34
# Store the agent on the context wrapper so we can access it later
35
context_wrapper._sentry_current_agent = agent
0 commit comments