File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed
sentry_sdk/integrations/pydantic_ai/patches Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change 44import sentry_sdk
55
66from ..spans import execute_tool_span , update_execute_tool_span
7- from ..utils import (
8- _capture_exception ,
9- get_current_agent ,
10- )
7+ from ..utils import get_current_agent
118
129from typing import TYPE_CHECKING
1310
@@ -73,18 +70,14 @@ async def wrapped_call_tool(
7370 agent ,
7471 tool_type = tool_type ,
7572 ) as span :
76- try :
77- result = await original_call_tool (
78- self ,
79- call ,
80- * args ,
81- ** kwargs ,
82- )
83- update_execute_tool_span (span , result )
84- return result
85- except Exception as exc :
86- _capture_exception (exc )
87- raise exc from None
73+ result = await original_call_tool (
74+ self ,
75+ call ,
76+ * args ,
77+ ** kwargs ,
78+ )
79+ update_execute_tool_span (span , result )
80+ return result
8881
8982 # No span context - just call original
9083 return await original_call_tool (
You can’t perform that action at this time.
0 commit comments