Skip to content

Conversation

@constantinius
Copy link
Contributor

Description

We need to patch agents.util._error_tracing.attach_error_to_current_span to set execute_tool spans status to error

Issues

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

@linear
Copy link

linearbot commented Oct 23, 2025

@codecov
Copy link

codecovbot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 62.16216% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.91%. Comparing base (64c145f) to head (2b53bb6).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing linesPatch %Lines
...ntegrations/openai_agents/patches/error_tracing.py60.00%8 Missing and 6 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #4986 +/- ## ========================================== - Coverage 84.00% 83.91% -0.10%  ========================================== Files 178 179 +1 Lines 17839 17876 +37 Branches 3171 3177 +6 ========================================== + Hits 14986 15000 +14 - Misses 1894 1909 +15 - Partials 959 967 +8 
Files with missing linesCoverage Δ
sentry_sdk/integrations/openai_agents/__init__.py90.47% <100.00%> (+0.47%)⬆️
...sdk/integrations/openai_agents/patches/__init__.py100.00% <100.00%> (ø)
...ntegrations/openai_agents/patches/error_tracing.py60.00% <60.00%> (ø)

... and 5 files with indirect coverage changes

@constantiniusconstantinius marked this pull request as ready for review October 24, 2025 06:51
@constantiniusconstantinius requested a review from a team as a code ownerOctober 24, 2025 06:51
cursor[bot]

This comment was marked as outdated.

Copy link
Member

@obostjancicobostjancic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@obostjancic
Copy link
Member

@getsentry/owners-python-sdk can someone take a quick glance at this before I merge it? Thanks!

@obostjancicobostjancic self-assigned this Oct 28, 2025
@alexander-alderman-webb
Copy link
Contributor

Looks good, I only have one comment for clarification: #4986 (comment).

@obostjancicobostjancic merged commit b3b2eb6 into masterOct 29, 2025
123 of 124 checks passed
@obostjancicobostjancic deleted the constantinius/fix/integrations/openai-agents-execute-tool-error-reporting branch October 29, 2025 08:43
shellmayr pushed a commit that referenced this pull request Oct 30, 2025
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