Skip to content

Conversation

shellmayr
Copy link
Member

@shellmayr shellmayr commented Sep 9, 2025

  • Catch ImportError for langchain.agents if langchain is not present and set AgentExecutor to None so the rest of the logic still keeps working
  • Add test for recording new OTEL-compliant data for langchain-core
  • Verified AI Agents functionality (span generation, token accounting, etc) with langchain-core and langchain-openai

Closes TET-1126
Closes PY-1833
Closes #4776

Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.76%. Comparing base (0eede69) to head (89c1be7).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4783      +/-   ##
==========================================
+ Coverage   84.67%   84.76%   +0.08%     
==========================================
  Files         158      158              
  Lines       16376    16379       +3     
  Branches     2809     2809              
==========================================
+ Hits        13866    13883      +17     
+ Misses       1685     1670      -15     
- Partials      825      826       +1     
Files with missing lines Coverage Δ
sentry_sdk/integrations/langchain.py 69.08% <100.00%> (+5.09%) ⬆️

... and 4 files with indirect coverage changes

@shellmayr shellmayr marked this pull request as ready for review September 9, 2025 07:36
@shellmayr shellmayr requested a review from a team as a code owner September 9, 2025 07:36
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

Nice! thanks for quick fix!

@antonpirker antonpirker merged commit 20f0f84 into master Sep 9, 2025
128 checks passed
@antonpirker antonpirker deleted the shellmayr/fix/langchain-extension-breaks-when-only-importing-langchain-core branch September 9, 2025 08:14
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.

LangchainIntegration breaks if only langchain-core is installed
2 participants