Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[pull] master from getsentry:master #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
[pull] master from getsentry:master #2
Changes from 1 commit
480217fbaa7a06cc4d168b3c7141cedef2e7bc1380b7a340a6230aeda680e0ca38eed1a34d0bfee16e354dc6c7b8e3afe266dc9a2af83b8755f03e02e652f3f94b20324ecd3a9742f9ef664505910b40b063ad991bd76c0d551d2375f68c740bcc3d5bc35a7300dce1349a372d1e6a21da8397b718a3eacefcdbc7333e18f895f097aa886ce05acdd39f85b3f75c3ed152b9d443b383c027ab907968cd8925a4ea7d050b515131610bac0ea9c0397cfd265698debb052bde42bc6b99c085b5b9d2c6e7102e78b06229a498d29de567496387fe97d6714888abe35ca9d0e15b3d993303cf729509455c23198de7562d760ba296c1ca41900949bdd19f94190f8fbadeb83deeecdb57ade1600e27a33d5898ddaec08ea20d8dee9b20d1feb97e428186c72980d16360009de5c5cb1a7189dad870cfc2530dd296e86027af12ed4a2b2bd26e1a910211f40054094e861b4f907546fd01b2a67019263487e75e8b332546de4cba02625efc236db3c2a53e7b3e65e0b03617a76fef98a730d96b6a7773d5a50093be2092a36b672dd75ae7b08235bd9cf9a48e4fb8c82675619d99c990f4c190679a02c5c184f40cb306e2406e904f71c942deb000090a3e37efb1d2c8ca286b947281ea3183ffcf35f674822dee403d89e3ef3f284ef78bad0ce518efeeebf9e714f5a5e091fb676504ad4d921679d8060a198eccfda399ce440cd729cdb9482a02610ae69935ef55d12ba2e584d4bcb3bf56dbe29c56be12569d33c7958ab6227680607cbee20fb81c5d5668e8bb6e9ea037d7103141e5af71902a06e013f0be49badb093faf616d75c8f5503d96f0d5d7628e9cc6c7e88d467095c81a6be80108b027edc1f093375de0e8a1826cbecbdf5e7cd06cd5ad7e2ee464fb8127fb3d48cc6152560362401914b92c64235c8656ce620e02aa2ea930863e0b0151d850d4cc514eeb4d680b4d1df6ff9ebb8eed2f3144e26af7b1ee4146ef31b8993b0728fa3875c5b306a35f3bdfd798854d49afaabfb822f8fde270e263c415130dd6105c51fdb2f8a039db32055cabb61105f78b481f9424775ad19a1cc6759f0e206839b1371586c5dae482c9301edd8294527c7496a15f037e22edc5643f271bbb20c7c8fc8d8d213f666da21b0e4855914d3c3cd03966c1216e559d732f134c2f961771df4c54165f5006b6eb205862f4153c5d47fcf5c4ba477f6ad7b3b6133529d46e5780bbFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
This PR adds support for LangChain v1. ## Changes - LangChain v1 Response Metadata Extraction - Updated response attribute extraction to support LangChain v1's different data structure: - Instrument ConfigurableModel from `chat_models/universal.cjs` Quick context: The `initChatModel` unified API (introduced in LangChain v1) was not being instrumented in CJS applications. This happened because: 1. `initChatModel` uses dynamic `import()` to load providers (even in CJS mode) 2. OpenTelemetry's CJS instrumentation only hooks `require()`, not dynamic `import()` 3. Provider packages like `@langchain/openai` were never being patched when loaded via `initChatModel` **Solution**: Added instrumentation for the main `langchain` package. When `langchain/dist/chat_models/universal.cjs` is loaded, we patch the `ConfigurableModel` prototype. Since `initChatModel` returns a `ConfigurableModel` instance, it inherits the patched methods regardless of how the provider is loaded. This fix ensures `initChatModel` works in CJS applications without requiring users to manually import provider packages. - Add tests for node integrations tests testing v1 changes - All existing tests continue to pass - New v1 test suite validates: - Basic chat model spans with and without PII - Tool call instrumentation - Message truncation behavior - Timing issues with pre-imported clients - `initChatModel` API with OpenAI (now working in both ESM and CJS) Closes https://linear.app/getsentry/issue/JS-1071/support-langchain-v1Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.