Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(integrations): hooking into error tracing function to find out if an execute tool span should be set to error #4986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
constantinius wants to merge 5 commits into master
base: master
Choose a base branch
Loading
from constantinius/fix/integrations/openai-agents-execute-tool-error-reporting

Conversation

@constantinius
Copy link
Contributor

@constantinius constantinius commented Oct 23, 2025

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

seer-by-sentry[bot] reacted with hooray emoji
Copy link

linear bot commented Oct 23, 2025

Copy link

codecov bot commented Oct 23, 2025
edited
Loading

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

Copy link
Member

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

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

Reviewers

@obostjancic obostjancic obostjancic approved these changes

@cursor cursor[bot] cursor[bot] left review comments

@alexander-alderman-webb alexander-alderman-webb alexander-alderman-webb left review comments

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /