Skip to content

Conversation

@shellmayr
Copy link
Member

@shellmayrshellmayr commented Oct 21, 2025

Contributes to TET-1208

@linear
Copy link

linearbot commented Oct 21, 2025

@shellmayrshellmayr marked this pull request as ready for review October 23, 2025 09:28
@shellmayrshellmayr requested a review from a team as a code ownerOctober 23, 2025 09:28
@cursor
Copy link

cursorbot commented Oct 23, 2025

Bug: Chat Span Index Assumption Error

The test assumes the chat span is at index "0" in the metadata path tx["_meta"]["spans"]["0"]["data"], but the chat span is retrieved by filtering the spans list with chat_spans = [span for span in tx.get("spans", []) if span.get("op") == OP.GEN_AI_CHAT]. There's no guarantee the filtered chat span is at index 0 in the original spans array. The test should either use the actual index of the chat span in the original spans list, or the transaction should be set up to ensure only one span exists.

Fix in CursorFix in Web

@cursor
Copy link

cursorbot commented Oct 23, 2025

Bug: Incorrect Empty String Key in Metadata Path

The metadata path contains an incorrect empty string key. The assertion tx["_meta"]["spans"]["0"]["data"]["gen_ai.request.messages"][""]["len"] accesses an intermediate empty string key [""] between the field name and the "len" metadata. The correct path should be tx["_meta"]["spans"]["0"]["data"]["gen_ai.request.messages"]["len"] without the empty string key.

Fix in CursorFix in Web

@codecov
Copy link

codecovbot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.97%. Comparing base (3d026cd) to head (dd4f521).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing linesPatch %Lines
sentry_sdk/integrations/litellm.py80.00%0 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #4973 +/- ## ======================================= Coverage 83.97% 83.97% ======================================= Files 165 165 Lines 17082 17085 +3 Branches 3000 3001 +1 ======================================= + Hits 14344 14347 +3  Misses 1839 1839 Partials 899 899 
Files with missing linesCoverage Δ
sentry_sdk/integrations/litellm.py77.47% <80.00%> (-0.31%)⬇️

... and 1 file with indirect coverage changes

@shellmayrshellmayr merged commit e9738f6 into masterOct 23, 2025
123 of 124 checks passed
@shellmayrshellmayr deleted the shellmayr/chore/litellm-message-truncation branch October 23, 2025 11:28
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.

3 participants

@shellmayr@alexander-alderman-webb