Skip to content

Conversation

@alexander-alderman-webb
Copy link
Contributor

@alexander-alderman-webb alexander-alderman-webb commented Nov 24, 2025

Description

Cherry-picked from #5049

Issues

Closes TET-1208

Reminders

@linear
Copy link

linear bot commented Nov 24, 2025

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.02%. Comparing base (80ba8fb) to head (e913b9e).
⚠️ Report is 18 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...k/integrations/openai_agents/spans/invoke_agent.py 75.00% 0 Missing and 1 partial ⚠️
sentry_sdk/integrations/openai_agents/utils.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5141   +/-   ##
=======================================
  Coverage   84.02%   84.02%           
=======================================
  Files         180      180           
  Lines       18223    18230    +7     
  Branches     3233     3235    +2     
=======================================
+ Hits        15311    15317    +6     
  Misses       1922     1922           
- Partials      990      991    +1     
Files with missing lines Coverage Δ
...k/integrations/openai_agents/spans/invoke_agent.py 86.11% <75.00%> (-1.77%) ⬇️
sentry_sdk/integrations/openai_agents/utils.py 89.77% <80.00%> (-0.71%) ⬇️

... and 1 file with indirect coverage changes

SPANDATA.GEN_AI_REQUEST_MESSAGES,
messages_data,
unpack=False,
)
Copy link

Choose a reason for hiding this comment

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

Bug: Empty messages no longer set span data

When request_messages is an empty list, truncate_and_annotate_messages returns None, causing the span data to not be set. Previously, the code would set SPANDATA.GEN_AI_REQUEST_MESSAGES to an empty JSON array even when request_messages was empty. This behavioral change could break code expecting this field to always exist when messages are processed.

Fix in Cursor Fix in Web

@alexander-alderman-webb alexander-alderman-webb merged commit 7449603 into master Dec 1, 2025
154 of 155 checks passed
@alexander-alderman-webb alexander-alderman-webb deleted the webb/truncate-openai-agents branch December 1, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants