feat(core): Add enableTruncation option to LangChain integration#20182
feat(core): Add enableTruncation option to LangChain integration#20182andreiborza wants to merge 5 commits intodevelopfrom
enableTruncation option to LangChain integration#20182Conversation
This PR adds an `enableTruncation` option to the LangChain integration that allows users to disable input message truncation. It defaults to `true` to preserve existing behavior. Also fixes missing truncation for LLM string prompts in extractLLMRequestAttributes and refactors to use the shared getTruncatedJsonString/getJsonString utilities. Closes: #20138
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Core
Other
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
dev-packages/node-integration-tests/suites/tracing/langchain/instrument-no-truncation.mjs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 691d17b. Configure here.
dev-packages/node-integration-tests/suites/tracing/langchain/instrument-no-truncation.mjs
Outdated
Show resolved
Hide resolved
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|

This PR adds an
enableTruncationoption to the LangChain integration that allows users to disable input message truncation. It defaults totrueto preserve existing behavior.Also fixes missing truncation for LLM string prompts in extractLLMRequestAttributes and refactors to use the shared getTruncatedJsonString/getJsonString utilities.
Closes: #20138