From c15f68429a60d59702eac3d072a4f39eccefd3d8 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 17 Mar 2025 16:20:41 -0300 Subject: [PATCH 01/11] add react native v7 migration --- .../react-native/migration/v6-to-v7.mdx | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/platforms/react-native/migration/v6-to-v7.mdx diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx new file mode 100644 index 0000000000000..08d9ed4ca6f6f --- /dev/null +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -0,0 +1,27 @@ +--- +title: Migrate from 6.x to 7.x +sidebar_order: 99 +draft: true + +description: "Learn how to migrate from version 6 to version 7 of the Sentry React Native SDK" +--- + +The main goal of version 6 of the Sentry React Native SDK, is to bring compatibility with Sentry JavaScript version 9. This version is introducing breaking changes because of the JavaScript SDK dependency upgrade to version 9 and because we've removed deprecated APIs and restructured npm package contents. + +## Important Changes In Dependencies + +The Sentry React Native SDK ships with the Sentry JavaScript SDK as a dependency. The Sentry JavaScript SDK has been updated to version 9. This version includes a number of behavioral changes that will not be caught by type checkers, linters, or tests, so we recommend carefully reading through the entire migration guide instead of relying on automatic tooling. Please follow [the JavaScript migration guides](/platforms/javascript/guides/react/migration/v8-to-v9/) to complete the upgrade. + +The initial `@sentry/react-native@7.0.0` ships with `@sentry/core@9.1.0`. Always use the exact JavaScript SDK version if adding it manually to your project. Any other version might not be compatible with the React Native SDK. + +### General API Changes + +Other general JavaScript SDK version 9 changes are described in the [JavaScript SDK 8.x to 9.x migration guide](/platforms/javascript/guides/react/migration/v8-to-v9/). + +## Important React Native SDK `7.x` Changes + +This section describes API changes in the Sentry React Native SDK, version 7. + +### React Native Tracing Options Moved to `Sentry.init` Options + +TODO From 977aff637b961def3bba2d458d1f6ead61e0db5c Mon Sep 17 00:00:00 2001 From: LucasZF Date: Wed, 19 Mar 2025 12:17:37 -0300 Subject: [PATCH 02/11] Update docs/platforms/react-native/migration/v6-to-v7.mdx Co-authored-by: Antonis Lilis --- docs/platforms/react-native/migration/v6-to-v7.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx index 08d9ed4ca6f6f..3f01a92ee08ac 100644 --- a/docs/platforms/react-native/migration/v6-to-v7.mdx +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -6,7 +6,7 @@ draft: true description: "Learn how to migrate from version 6 to version 7 of the Sentry React Native SDK" --- -The main goal of version 6 of the Sentry React Native SDK, is to bring compatibility with Sentry JavaScript version 9. This version is introducing breaking changes because of the JavaScript SDK dependency upgrade to version 9 and because we've removed deprecated APIs and restructured npm package contents. +The main goal of version 7 of the Sentry React Native SDK, is to bring compatibility with Sentry JavaScript version 9. This version is introducing breaking changes because of the JavaScript SDK dependency upgrade to version 9 and because we've removed deprecated APIs and restructured npm package contents. ## Important Changes In Dependencies From 3c45896f963a8bc5a5e372b08af3536988810ced Mon Sep 17 00:00:00 2001 From: LucasZF Date: Mon, 7 Apr 2025 09:10:13 -0300 Subject: [PATCH 03/11] Update docs/platforms/react-native/migration/v6-to-v7.mdx Co-authored-by: Antonis Lilis --- docs/platforms/react-native/migration/v6-to-v7.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx index 3f01a92ee08ac..5c7eb16a28215 100644 --- a/docs/platforms/react-native/migration/v6-to-v7.mdx +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -14,6 +14,7 @@ The Sentry React Native SDK ships with the Sentry JavaScript SDK as a dependency The initial `@sentry/react-native@7.0.0` ships with `@sentry/core@9.1.0`. Always use the exact JavaScript SDK version if adding it manually to your project. Any other version might not be compatible with the React Native SDK. +Version 7 also includes a major upgrade to the Android SDK dependency, introducing behavioral changes, breaking changes, and deprecations. If you are using the Android SDK directly, please follow the [Android SDK version 8 migration guide](/platforms/android/migration/#migrating-from-iosentrysentry-7x-to-iosentrysentry-800). ### General API Changes Other general JavaScript SDK version 9 changes are described in the [JavaScript SDK 8.x to 9.x migration guide](/platforms/javascript/guides/react/migration/v8-to-v9/). From 51aca715a5a2f6c783487ae751e4af5e1234a9cc Mon Sep 17 00:00:00 2001 From: lucas Date: Tue, 3 Jun 2025 16:39:53 -0300 Subject: [PATCH 04/11] merge --- .../react-native/migration/v6-to-v7.mdx | 31 ++++++++++++++++--- package.json | 3 +- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx index 5c7eb16a28215..8cdfa90111dfa 100644 --- a/docs/platforms/react-native/migration/v6-to-v7.mdx +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -1,11 +1,13 @@ --- title: Migrate from 6.x to 7.x sidebar_order: 99 -draft: true - description: "Learn how to migrate from version 6 to version 7 of the Sentry React Native SDK" --- + +Version 7 is still under development, the documentation may change before the final release. + + The main goal of version 7 of the Sentry React Native SDK, is to bring compatibility with Sentry JavaScript version 9. This version is introducing breaking changes because of the JavaScript SDK dependency upgrade to version 9 and because we've removed deprecated APIs and restructured npm package contents. ## Important Changes In Dependencies @@ -19,10 +21,29 @@ Version 7 also includes a major upgrade to the Android SDK dependency, introduci Other general JavaScript SDK version 9 changes are described in the [JavaScript SDK 8.x to 9.x migration guide](/platforms/javascript/guides/react/migration/v8-to-v9/). +### Self-Hosted Sentry Compatibility + +Beginning with version 7.0.0, the Sentry Capacitor SDK will only support self-hosted Sentry instances version 25.2.0 and above. This change does not affect users of `sentry.io`. + ## Important React Native SDK `7.x` Changes -This section describes API changes in the Sentry React Native SDK, version 7. +This section describes API changes in the Sentry React7 Native SDK, version 7. + +### captureUserFeedback is now removed + +You can use the updated snippet in order to capture user Feedbacks: + +```diff +- import { captureUserFeedback } from '@sentry/react-native'; ++ import { captureFeedback } from '@sentry/react-native'; -### React Native Tracing Options Moved to `Sentry.init` Options +- captureUserFeedback({ ++ captureFeedback({ + name: 'my name', + email: 'myemail@sentry.io', + message: 'it broke', + associatedEventId: 'eventID' + }); +``` -TODO +Additionally you can also see our new Feedback integration by checking the following [link](../../user-feedback/configuration/) \ No newline at end of file diff --git a/package.json b/package.json index bc4b2bc23723f..928d86d3e8121 100644 --- a/package.json +++ b/package.json @@ -136,5 +136,6 @@ "volta": { "node": "20.11.0", "yarn": "1.22.22" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } From a6f84cfc6d668a2fb3e72d9efa21f5c187eff439 Mon Sep 17 00:00:00 2001 From: lucas Date: Tue, 3 Jun 2025 16:40:18 -0300 Subject: [PATCH 05/11] remove package manager --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 928d86d3e8121..6573ec7bf337d 100644 --- a/package.json +++ b/package.json @@ -136,6 +136,5 @@ "volta": { "node": "20.11.0", "yarn": "1.22.22" - }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" -} + } +} \ No newline at end of file From 58d334d82f5573dbbb84979ac29a33a193018dfd Mon Sep 17 00:00:00 2001 From: lucas Date: Tue, 3 Jun 2025 16:42:22 -0300 Subject: [PATCH 06/11] extra space --- docs/platforms/react-native/migration/v6-to-v7.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx index 8cdfa90111dfa..036a7056bfe9d 100644 --- a/docs/platforms/react-native/migration/v6-to-v7.mdx +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -17,6 +17,7 @@ The Sentry React Native SDK ships with the Sentry JavaScript SDK as a dependency The initial `@sentry/react-native@7.0.0` ships with `@sentry/core@9.1.0`. Always use the exact JavaScript SDK version if adding it manually to your project. Any other version might not be compatible with the React Native SDK. Version 7 also includes a major upgrade to the Android SDK dependency, introducing behavioral changes, breaking changes, and deprecations. If you are using the Android SDK directly, please follow the [Android SDK version 8 migration guide](/platforms/android/migration/#migrating-from-iosentrysentry-7x-to-iosentrysentry-800). + ### General API Changes Other general JavaScript SDK version 9 changes are described in the [JavaScript SDK 8.x to 9.x migration guide](/platforms/javascript/guides/react/migration/v8-to-v9/). From 4770428fc44067dd73807566ee0520f8b4933030 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 4 Jun 2025 10:38:43 +0200 Subject: [PATCH 07/11] fix missing new line package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6573ec7bf337d..bc4b2bc23723f 100644 --- a/package.json +++ b/package.json @@ -137,4 +137,4 @@ "node": "20.11.0", "yarn": "1.22.22" } -} \ No newline at end of file +} From 94e1d3627187b60ca0c4b749c31b591c0f3dbb89 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 4 Jun 2025 12:26:54 +0200 Subject: [PATCH 08/11] fix diff style --- .../react-native/migration/v6-to-v7.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx index 036a7056bfe9d..867010d5f2594 100644 --- a/docs/platforms/react-native/migration/v6-to-v7.mdx +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -34,17 +34,17 @@ This section describes API changes in the Sentry React7 Native SDK, version 7. You can use the updated snippet in order to capture user Feedbacks: -```diff -- import { captureUserFeedback } from '@sentry/react-native'; -+ import { captureFeedback } from '@sentry/react-native'; - -- captureUserFeedback({ -+ captureFeedback({ - name: 'my name', - email: 'myemail@sentry.io', - message: 'it broke', - associatedEventId: 'eventID' +```javascript diff ++ import { captureFeedback } from '@sentry/react-native'; +- import { captureUserFeedback } from '@sentry/react-native'; + ++ captureUserFeedback({ +- captureFeedback({ + name: 'my name', + email: 'myemail@sentry.io', + message: 'it broke', + associatedEventId: 'eventID', }); ``` -Additionally you can also see our new Feedback integration by checking the following [link](../../user-feedback/configuration/) \ No newline at end of file +Additionally you can also see our new Feedback integration by checking the following [link](../../user-feedback/configuration/) From f960918cb7f2e959a5363545d8dfd2a9eb4e49ae Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Thu, 5 Jun 2025 13:31:50 +0200 Subject: [PATCH 09/11] add more changes to the v7 migration guide --- .../react-native/migration/v6-to-v7.mdx | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx index 867010d5f2594..aee4396533b8a 100644 --- a/docs/platforms/react-native/migration/v6-to-v7.mdx +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -18,7 +18,7 @@ The initial `@sentry/react-native@7.0.0` ships with `@sentry/core@9.1.0`. Always Version 7 also includes a major upgrade to the Android SDK dependency, introducing behavioral changes, breaking changes, and deprecations. If you are using the Android SDK directly, please follow the [Android SDK version 8 migration guide](/platforms/android/migration/#migrating-from-iosentrysentry-7x-to-iosentrysentry-800). -### General API Changes +### Major Changes in Sentry JS SDK v9 Other general JavaScript SDK version 9 changes are described in the [JavaScript SDK 8.x to 9.x migration guide](/platforms/javascript/guides/react/migration/v8-to-v9/). @@ -30,7 +30,7 @@ Beginning with version 7.0.0, the Sentry Capacitor SDK will only support self-ho This section describes API changes in the Sentry React7 Native SDK, version 7. -### captureUserFeedback is now removed +### `captureUserFeedback` is now removed You can use the updated snippet in order to capture user Feedbacks: @@ -48,3 +48,34 @@ You can use the updated snippet in order to capture user Feedbacks: ``` Additionally you can also see our new Feedback integration by checking the following [link](../../user-feedback/configuration/) + +### `autoSessionTracking` united with `enableAutoSessionTracking` + +Option key `autoSessionTracking` was removed. Use `enableAutoSessionTracking` instead, enabled by default. + +```javascript diff +Sentry.init({ ++ enableAutoSessionTracking: true, +- autoSessionTracking: true, +}); +``` + +### `browserReplayIntegration` can be used directly without `isWeb` check + +The check is done inside of the integration, which makes it easier to use. + +```javascript diff +Sentry.init({ ++ integrations: [ Sentry.browserReplayIntegration() ], +- integrations: (defaultIntegrations) => { +- if (Platform.OS === 'web') { +- defaultIntegrations.push(Sentry.browserReplayIntegration()); +- } +- return defaultIntegrations; +- }, +}); +``` + +### `Cold/Warm App Start` spans were renamed to `Cold/Warm Start` + +The `App` word was removed from the span description. If you have any logic in your application or in Sentry based on this span description, please, check if it still works. From 6afe1c468920564c18d7cdc0fe338c30349dad4c Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Thu, 5 Jun 2025 16:07:51 +0200 Subject: [PATCH 10/11] add expo go module detection note --- docs/platforms/react-native/migration/v6-to-v7.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx index aee4396533b8a..29fb94120dcac 100644 --- a/docs/platforms/react-native/migration/v6-to-v7.mdx +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -79,3 +79,8 @@ Sentry.init({ ### `Cold/Warm App Start` spans were renamed to `Cold/Warm Start` The `App` word was removed from the span description. If you have any logic in your application or in Sentry based on this span description, please, check if it still works. + +### Detection of Expo Go uses `ExpoGo` module + +Starting with version 7.0.0, the Sentry React Native SDK will use `ExpoGo` module to detect if the application is running on Expo Go. This differs from the previous behavior, where the SDK would check for deprecated `appOwnership` property. This new approach doesn't work for Expo SDK 49 and older. +Minimum supported Expo SDK version is 50, same as in Sentry React Native SDK v6. From da3f9e7ed25e988f5f3b09e147c3632779e14480 Mon Sep 17 00:00:00 2001 From: LucasZF Date: Thu, 12 Jun 2025 12:35:36 -0300 Subject: [PATCH 11/11] Apply suggestions from code review Co-authored-by: Alex Krawiec --- .../react-native/migration/v6-to-v7.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/platforms/react-native/migration/v6-to-v7.mdx b/docs/platforms/react-native/migration/v6-to-v7.mdx index 29fb94120dcac..dc500ee60cda4 100644 --- a/docs/platforms/react-native/migration/v6-to-v7.mdx +++ b/docs/platforms/react-native/migration/v6-to-v7.mdx @@ -5,14 +5,14 @@ description: "Learn how to migrate from version 6 to version 7 of the Sentry Rea --- -Version 7 is still under development, the documentation may change before the final release. +Version 7 is still under development, this documentation may change before the final release. -The main goal of version 7 of the Sentry React Native SDK, is to bring compatibility with Sentry JavaScript version 9. This version is introducing breaking changes because of the JavaScript SDK dependency upgrade to version 9 and because we've removed deprecated APIs and restructured npm package contents. +The main goal of version 7 of the Sentry React Native SDK is to provide compatibility with Sentry JavaScript version 9. This update includes breaking changes due to the upgrade to JavaScript SDK v9, the removal of deprecated APIs, and a reorganization of the npm package structure. -## Important Changes In Dependencies +## Important Changes in Dependencies -The Sentry React Native SDK ships with the Sentry JavaScript SDK as a dependency. The Sentry JavaScript SDK has been updated to version 9. This version includes a number of behavioral changes that will not be caught by type checkers, linters, or tests, so we recommend carefully reading through the entire migration guide instead of relying on automatic tooling. Please follow [the JavaScript migration guides](/platforms/javascript/guides/react/migration/v8-to-v9/) to complete the upgrade. +The Sentry React Native SDK ships with the Sentry JavaScript SDK Version 9 as a dependency. This version includes a number of behavioral changes that will not be caught by type checkers, linters, or tests, so we recommend carefully reading through the entire migration guide instead of relying on automatic tooling. Please follow [the JavaScript migration guides](/platforms/javascript/guides/react/migration/v8-to-v9/) to complete the upgrade. The initial `@sentry/react-native@7.0.0` ships with `@sentry/core@9.1.0`. Always use the exact JavaScript SDK version if adding it manually to your project. Any other version might not be compatible with the React Native SDK. @@ -28,11 +28,11 @@ Beginning with version 7.0.0, the Sentry Capacitor SDK will only support self-ho ## Important React Native SDK `7.x` Changes -This section describes API changes in the Sentry React7 Native SDK, version 7. +This section describes API changes in the Sentry React Native SDK, version 7. ### `captureUserFeedback` is now removed -You can use the updated snippet in order to capture user Feedbacks: +You can use the updated snippet in order to capture user Feedback: ```javascript diff + import { captureFeedback } from '@sentry/react-native'; @@ -47,7 +47,7 @@ You can use the updated snippet in order to capture user Feedbacks: }); ``` -Additionally you can also see our new Feedback integration by checking the following [link](../../user-feedback/configuration/) +Additionally you can also see our new Feedback integration by checking the [User Feedback Configuration guide](../../user-feedback/configuration/) ### `autoSessionTracking` united with `enableAutoSessionTracking` @@ -60,9 +60,9 @@ Sentry.init({ }); ``` -### `browserReplayIntegration` can be used directly without `isWeb` check +### `browserReplayIntegration` can be used directly without the `isWeb` check -The check is done inside of the integration, which makes it easier to use. +The check is now done inside of the integration, simplifying workflows. ```javascript diff Sentry.init({ @@ -78,9 +78,9 @@ Sentry.init({ ### `Cold/Warm App Start` spans were renamed to `Cold/Warm Start` -The `App` word was removed from the span description. If you have any logic in your application or in Sentry based on this span description, please, check if it still works. +The `App` word was removed from the span description. If you have any logic in your application or in Sentry based on this span description, please, make sure to update. ### Detection of Expo Go uses `ExpoGo` module -Starting with version 7.0.0, the Sentry React Native SDK will use `ExpoGo` module to detect if the application is running on Expo Go. This differs from the previous behavior, where the SDK would check for deprecated `appOwnership` property. This new approach doesn't work for Expo SDK 49 and older. -Minimum supported Expo SDK version is 50, same as in Sentry React Native SDK v6. +Starting with version 7.0.0, the Sentry React Native SDK will use the `ExpoGo` module to detect if the application is running on Expo Go. This differs from the previous behavior, where the SDK would check for the deprecated `appOwnership` property. This new approach doesn't work for Expo SDK 49 and older. +The minimum supported Expo SDK version is 50, same as in Sentry React Native SDK v6.