Skip to content

Conversation

@constantinius
Copy link
Contributor

Description

Properly wrap tool calls in try/except and capture exceptions so that the Sentry issues are actually linked to the tool calls
Also fixed issue related to tool call argument retrieval

Issues

Closes https://linear.app/getsentry/issue/TET-1357/issue-associated-with-invoke-agent-instead-of-execute-tool

Reminders

@constantiniusconstantinius requested a review from a team as a code ownerNovember 4, 2025 15:10
@linear
Copy link

linearbot commented Nov 4, 2025

@constantiniusconstantinius requested a review from a teamNovember 4, 2025 15:11
@codecov
Copy link

codecovbot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.95%. Comparing base (e910302) to head (ea170e6).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing linesPatch %Lines
...ntry_sdk/integrations/pydantic_ai/patches/tools.py83.33%2 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #5065 +/- ## ========================================== + Coverage 83.88% 83.95% +0.07%  ========================================== Files 179 179 Lines 17916 17929 +13 Branches 3187 3188 +1 ========================================== + Hits 15029 15053 +24 + Misses 1914 1904 -10 + Partials 973 972 -1 
Files with missing linesCoverage Δ
..._sdk/integrations/pydantic_ai/patches/agent_run.py89.15% <100.00%> (-0.62%)⬇️
sentry_sdk/integrations/pydantic_ai/utils.py89.28% <100.00%> (+0.53%)⬆️
...ntry_sdk/integrations/pydantic_ai/patches/tools.py78.94% <83.33%> (-1.06%)⬇️

... and 5 files with indirect coverage changes

@constantiniusconstantinius enabled auto-merge (squash) November 5, 2025 09:15
@constantiniusconstantinius merged commit e8d5f1b into masterNov 5, 2025
137 of 142 checks passed
@constantiniusconstantinius deleted the constantinius/fix/integrations/pydantic-ai-tool-call-issue branch November 5, 2025 09:29
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@constantinius@obostjancic@alexander-alderman-webb