-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(js): Add v10 migration guide #14506
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
89356b4
feat(js): Add v10 migration guide
andreiborza 7c2089a
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 246a8d4
Remove tanstackstart-react exclusion
andreiborza 2eb036b
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 6e5920f
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 5e2ea7e
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 2dbf9b1
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 44c3ac0
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 93972c5
Add npm link to node-core
andreiborza cf01364
Add session replay breaking change to migration guide
andreiborza 7b8081f
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 1173a12
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 625f9f5
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 659aeff
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 90260c8
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza 4364b37
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza eede6c3
Update docs/platforms/javascript/common/migration/v9-to-v10.mdx
andreiborza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| --- | ||
| title: Migrate from 9.x to 10.x | ||
| sidebar_order: 8880 | ||
| description: "Learn about migrating from Sentry JavaScript SDK 9.x to 10.x" | ||
| notSupported: | ||
| - javascript.capacitor | ||
| - javascript.cordova | ||
| - javascript.electron | ||
| --- | ||
|
|
||
| <PlatformSection supported={["javascript"]}> | ||
| <Alert title="Using a framework?" level="info"> | ||
|
|
||
| Make sure to select your framework in the dropdown in the top left corner of the page. | ||
|
|
||
| </Alert> | ||
| </PlatformSection> | ||
|
|
||
| Version 10 of the Sentry JavaScript SDK primarily focuses on upgrading underlying OpenTelemetry dependencies to v2 with minimal breaking changes. | ||
|
|
||
| Version 10 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or higher (unchanged from v9). | ||
| Lower versions may continue to work, but may not support all features. | ||
|
|
||
| ## Version Support Changes: | ||
|
|
||
| Version 10 of the Sentry SDK has new compatibility ranges for runtimes and frameworks. | ||
|
|
||
| ### Node.js | ||
|
|
||
| All OpenTelemetry dependencies have been bumped to `2.x.x` / `0.20x.x` respectively and all OpenTelemetry instrumentations have been upgraded to their latest version. | ||
|
|
||
| If you cannot run with OpenTelmetry v2 versions, consider either staying on Version 9 of our SDKs or using [@sentry/node-core](https://www.npmjs.com/package/@sentry/node-core) instead, which ships with widened OpenTelemetry peer dependencies. | ||
andreiborza marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### AWS Lambda Layer Changes | ||
|
|
||
| A new AWS Lambda Layer for version 10 will be published as `SentryNodeServerlessSDKv10`. | ||
|
|
||
| Updates and fixes for version 9 will be published as `SentryNodeServerlessSDKv9`. | ||
|
|
||
| <PlatformCategorySection supported={['browser']}> | ||
|
|
||
| ## Removed FID Web Vital reporting | ||
|
|
||
| **The SDKs no longer report the First Input Delay (FID) web vital**. | ||
|
|
||
| This was done because FID has been replaced by Interaction to Next Paint (INP) and is therefore no longer relevant for assessing and tracking a website's performance. | ||
| For reference, FID has long been deprecated by Google's official `web-vitals` library and was eventually removed in version `5.0.0`. | ||
| Sentry now follows Google's lead by also removing it. | ||
|
|
||
| The removal entails **no breaking API changes**. However, in rare cases, you might need to adjust some of your Sentry SDK and product setup: | ||
|
|
||
| - Remove any logic in `beforeSend` or other filtering/event processing logic that depends on FID or replace it with INP logic. | ||
| - If you set up Sentry Alerts that depend on FID, be aware that these could trigger once you upgrade the SDK, due to a lack of new values. | ||
| To replace them, adjust your alerts (or dashbaords) to use INP. | ||
andreiborza marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Removed `_experiments.autoFlushOnFeedback` for Session Replays | ||
|
|
||
| The `_experiments.autoFlushOnFeedback` option was removed and is now default behavior. | ||
andreiborza marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| </PlatformCategorySection> | ||
|
|
||
| ## Removed APIs | ||
|
|
||
| The changes outlined in this section detail deprecated APIs that are now removed. | ||
|
|
||
| - `BaseClient` was removed, use `Client` as a direct replacement. | ||
| - `hasTracingEnabled` was removed, use `hasSpansEnabled` as a direct replacement. | ||
| - The internal `logger` and type `Logger` exports in `@sentry/core` were removed, use `debug` and type `SentryDebugLogger` instead. This does not affect the `logger` export used for [Sentry Logging](https://docs.sentry.io/product/explore/logs/getting-started/) | ||
| - The `_experiments.enableLogs` and `_experiments.beforeSendLog` options were removed, use the top-level `enableLogs` and `beforeSendLog` options instead. | ||
|
|
||
| ```js | ||
| // before | ||
| Sentry.init({ | ||
| _experiments: { | ||
| enableLogs: true, | ||
| beforeSendLog: (log) => { | ||
| return log; | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| // after | ||
| Sentry.init({ | ||
| enableLogs: true, | ||
| beforeSendLog: (log) => { | ||
| return log; | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| ## Version Support Timeline | ||
|
|
||
| Version support timelines are stressful for everybody using the SDK, so we won't be defining one. | ||
andreiborza marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Instead, we will be applying bug fixes and features to older versions as long as there is demand. | ||
|
|
||
| Additionally, we hold ourselves accountable to any security issues, meaning that if any vulnerabilities are found, we will in almost all cases backport them. | ||
andreiborza marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Note, that backporting decisions are made on a case-by-case basis. | ||
| If you need a fix or feature in a previous version of the SDK, please reach out via a GitHub Issue. | ||
andreiborza marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.