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

… an execute tool span should be set to error
@linear
Copy link

linear bot commented Oct 23, 2025

@codecov
Copy link

codecov bot 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).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ntegrations/openai_agents/patches/error_tracing.py 60.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 lines Coverage Δ
sentry_sdk/integrations/openai_agents/__init__.py 90.47% <100.00%> (+0.47%) ⬆️
...sdk/integrations/openai_agents/patches/__init__.py 100.00% <100.00%> (ø)
...ntegrations/openai_agents/patches/error_tracing.py 60.00% <60.00%> (ø)

... and 5 files with indirect coverage changes

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

This comment was marked as outdated.

Copy link
Member

@obostjancic obostjancic 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!

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

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

Sign up for free to 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