Skip to content

Conversation

shellmayr
Copy link
Member

@shellmayr shellmayr commented Sep 3, 2025

  • Improve the instrumentation of input messages in the LangChain SDK

Before:
Screenshot 2025-09-03 at 16 30 05

After:
Screenshot 2025-09-03 at 16 30 08

Closes TET-1058

Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 48.97959% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.77%. Comparing base (f702ec9) to head (c3eada8).
⚠️ Report is 5 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/integrations/langchain.py 48.97% 18 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4750      +/-   ##
==========================================
- Coverage   84.89%   84.77%   -0.12%     
==========================================
  Files         156      157       +1     
  Lines       16115    16179      +64     
  Branches     2741     2757      +16     
==========================================
+ Hits        13681    13716      +35     
- Misses       1645     1668      +23     
- Partials      789      795       +6     
Files with missing lines Coverage Δ
sentry_sdk/integrations/langchain.py 63.99% <48.97%> (-1.69%) ⬇️

... and 7 files with indirect coverage changes

Copy link

linear bot commented Sep 4, 2025

@shellmayr shellmayr marked this pull request as ready for review September 4, 2025 12:39
@shellmayr shellmayr requested a review from a team as a code owner September 4, 2025 12:40
[
input,
],
span, SPANDATA.GEN_AI_REQUEST_MESSAGES, safe_serialize([input])
Copy link

Choose a reason for hiding this comment

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

Bug: Double Serialization in set_data_normalized

The set_data_normalized function at line 735 receives data that's already safe_serialized. Since set_data_normalized handles its own serialization, this can cause double serialization or incorrect data. This is inconsistent with other safe_serialize changes in the commit.

Fix in Cursor Fix in Web

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.

1 participant