feat(core): Export instrumentStateGraph and deprecate instrumentLangGraph - #6520
Merged
Conversation
…raph The JavaScript SDK renamed `instrumentLangGraph` to `instrumentStateGraph` in v10.68.0 and marked the old name as deprecated. Re-export the new name and keep the old one for backwards compatibility until the next major. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
|
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Matches the precedent set by the featureFlagsIntegration and logger re-export entries, which are Changes rather than Features. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
antonis
marked this pull request as ready for review
July 27, 2026 08:18
alwx
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📢 Type of change
📜 Description
Follow-up to #6516 (JavaScript SDK bump to v10.68.0).
instrumentStateGraphfrom@sentry/core.instrumentLangGraphand mark it@deprecatedso consumers get IDE strikethrough and a migration hint. The JSDoc tag is preserved in both the emitteddisttypes and the downleveledts3.8types.etc/sentry-react-native.api.md).### Changes(matching thefeatureFlagsIntegration/loggerre-export precedent), not### Features.test/aiExports.test.tsto cover the new export and assert the deprecated name is the same function reference.No behavior change —
instrumentLangGraphis an alias ofinstrumentStateGraphupstream, so existing code keeps working unchanged.💡 Motivation and Context
sentry-javascript v10.68.0 (#22491) renamed
instrumentLangGraphtoinstrumentStateGraphand deprecated the old name:The RN SDK only re-exported the deprecated name, so React Native users had no way to reach the new API and got no deprecation signal. This aligns the RN public surface with the upstream JavaScript SDK ahead of the next major, where the alias will be dropped.
💚 How did you test it?
Run locally on this branch:
yarn test— 1718 tests / 127 suites passing, including the extendedtest/aiExports.test.ts.yarn lint:lerna— 0 errors (1 pre-existing unrelated warning in a sample).yarn circularDepCheck— no circular dependencies.cd packages/core && yarn api-report:check— API report up to date.@deprecatedtag survives intopackages/core/dist/js/index.d.tsandpackages/core/ts3.8/dist/js/index.d.ts.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
instrumentLangGraphalias in the next major version.instrumentCreateReactAgentandinstrumentLangChainEmbeddings, which are available in the browser build but not currently surfaced by the RN SDK (pre-existing gap, not introduced by v10.68.0).🤖 Generated with Claude Code