Skip to content

Commit c5f42a7

Browse files
Apply suggestions from code review before v5
Co-authored-by: Liza Mock <[email protected]>
1 parent e847bc0 commit c5f42a7

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

docs/platforms/react-native/migration/before-v5.mdx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Migrate to 5.x
33
sidebar_order: 200
4-
description: "Learn about migrating to the SDK version 5."
4+
description: "Learn how to migrate to version 5 of the SDK ."
55
---
66

77
## From 4.x to 5.x
@@ -17,17 +17,17 @@ Rename the following `Sentry.init` options:
1717
- `ReactNativeTracingOptions.idleTimeout` to `ReactNativeTracingOptions.idleTimeoutMs`
1818
- `ReactNativeTracingOptions.maxTransactionDuration` to `ReactNativeTracingOptions.finalTimeoutMs`
1919

20-
If you are using `TouchEventBoundary` and `accessibilityLabel` set the following:
20+
If you're using `TouchEventBoundary` and `accessibilityLabel` set the following:
2121

2222
```javascript
2323
Sentry.wrap(App, {
2424
touchEventBoundaryProps: { labelName: "accessibilityLabel" },
2525
});
2626
```
2727

28-
Current stack trace for `Sentry.captureMessage` has been moved from `event.exception` to `event.threads`.
28+
The current stack trace for `Sentry.captureMessage` has been moved from `event.exception` to `event.threads`.
2929

30-
Default `breadcrumb.level` is `info`, value `critical` has been removed and `log` is transformed to `debug` on iOS and Android.
30+
The default `breadcrumb.level` is `info`, value `critical` has been removed and `log` has been transformed to `debug` on iOS and Android.
3131

3232
The bundled `sentry-cli` version has been bumped to [v2.10.0](https://github.com/getsentry/sentry-cli/releases/tag/2.10.0). Check your usage of `sentry-cli` to reflect [breaking changes](https://github.com/getsentry/sentry-cli/releases/tag/2.0.0). Note, that `upload-dsym` has been replaced by `debug-files upload` and requires a path. Make sure to check your `Upload Debug Symbols` build step in your Xcode project. The command should look like the example below:
3333

@@ -50,15 +50,15 @@ The following metadata are synchronized from `sentry-cocoa` to `react-native`:
5050
- `environment`
5151
- `breadcrumbs`
5252

53-
The synchronized `fingerprint` might affect grouping of issues in Sentry. React Native `event.fingerprint` is merged with iOS `fingerprint` without duplicates with RN items being first in the order.
53+
The synchronized `fingerprint` might affect issue grouping in Sentry. React Native `event.fingerprint` is merged with iOS `fingerprint` without duplicates with RN items being first in the order.
5454

5555
`sentry-cocoa` has been bumped to v8.0.0, please follow the related migration [here](/platforms/apple/migration/#migrating-from-7x-to-8x).
5656

5757
`sentry-wizard` doesn't patch iOS projects for React Native 0.65 to 0.68. These versions have to be [patched manually](/platforms/react-native/manual-setup/manual-setup/#bundle-react-native-code-and-images).
5858

5959
### Changes to Minimum Supported Versions
6060

61-
The minimum supported iOS version has been bumped iOS 11. The minimum Android API has been bumped to 21. The minimum supported React Native version is 0.65.0.
61+
The minimum supported iOS version has been bumped to iOS 11. The minimum Android API has been bumped to 21. The minimum supported React Native version is 0.65.0.
6262

6363
## From 4.8.x to 4.9.x
6464

@@ -100,9 +100,9 @@ See the JS SDK migration guide [here](https://github.com/getsentry/sentry-javasc
100100

101101
## From 3.x to 4.x
102102

103-
By bumping Sentry JavaScript to v7, new breaking changes were introduced, to know more what was changed, check the [breaking changes changelog](https://github.com/getsentry/sentry-javascript/blob/7.0.0/CHANGELOG.md#breaking-changes) from Sentry Javascript.
103+
By bumping Sentry JavaScript to v7, new breaking changes were introduced, to learn more about what was changed, check out the [breaking changes changelog](https://github.com/getsentry/sentry-javascript/blob/7.0.0/CHANGELOG.md#breaking-changes) from Sentry Javascript.
104104

105-
By bumping Sentry Android to v6, new breaking changes were introduced, to know more what was changed, check the [migration guide](/platforms/android/migration/#migrating-from-iosentrysentry-android-5x-to-iosentrysentry-android-600).
105+
By bumping Sentry Android to v6, new breaking changes were introduced, to learn more about what was changed, check out the [migration guide](/platforms/android/migration/#migrating-from-iosentrysentry-android-5x-to-iosentrysentry-android-600).
106106

107107
## From 3.0.x to 3.1.x
108108

@@ -117,9 +117,9 @@ const routingInstrumentation = new Sentry.ReactNavigationInstrumentation();
117117

118118
## From 2.x to 3.x
119119

120-
There are no changes needed when migrating from versions `2.x` to `3.x`, although you will need to make sure that you run `pod install` on iOS and to rebuild your app on both platforms.
120+
There are no changes needed when migrating from versions `2.x` to `3.x`, although you will need to make sure that you run `pod install` on iOS and that you rebuild your app on both platforms.
121121

122-
### Event origin and environment tags
122+
### Event Origin and Environment Tags
123123

124124
When upgrading from prior versions to `3.x`, you may see a mismatch in the values of the `event.environment` tag compared to events sent from the SDK prior to this version. Events that originate from native iOS code will now have the `event.environment` tag set to `native`. Read more about these tags on the [event information guide](/platforms/react-native/usage/event-information/#event-origin-and-environment-tags).
125125

@@ -131,7 +131,7 @@ The breaking changes are relevant only to Android. There are no breaking changes
131131

132132
Sentry React Native version `2.5.0` depends on Sentry Android `5.0.0`. Please [refer to the Android migration guide for Android-specific changes](/platforms/android/migration/#migrating-from-iosentrysentry-android-430-to-iosentrysentry-android-500).
133133

134-
`Settings.Secure.ANDROID_ID` has been removed and replaced with a randomly-generated `installationId`. This may affect the number of unique users displayed on the the Issues page and Alerts. If you always set a custom user using `Sentry.setUser(customUser)`, the behavior has not changed. While you don't have to make any update, if you want to maintain the old behavior, use the following code snippet which makes use of the [react-native-device-info](https://github.com/react-native-device-info/react-native-device-info) library.
134+
`Settings.Secure.ANDROID_ID` has been removed and replaced with a randomly-generated `installationId`. This may affect the number of unique users displayed on the the Issues page and Alerts. If you've always set a custom user using `Sentry.setUser(customUser)`, the behavior hasn't changed. While you don't have to make any updates, if you want to maintain the old behavior, use the following code snippet which makes use of the [react-native-device-info](https://github.com/react-native-device-info/react-native-device-info) library.
135135

136136
```javascript
137137
import { Platform } from "react-native";
@@ -161,7 +161,7 @@ if (Platform.OS === "android") {
161161

162162
## React Navigation Instrumentation from &lt;2.3.0
163163

164-
We changed the initialization method for the React Navigation v5 and above routing instrumentation to avoid a potential issue when using linking. You now register the navigation container inside the `onReady` prop passed to the `NavigationContainer`.
164+
We changed the initialization method for the React Navigation v5 and above, routing instrumentation to avoid a potential issue when using linking. You now register the navigation container inside the `onReady` prop passed to the `NavigationContainer`.
165165

166166
From:
167167

@@ -235,23 +235,23 @@ class App extends React.Component {
235235

236236
Sentry's most recent version of our React Native SDK enables release health tracking and native stack traces by default.
237237

238-
This version of the SDK uses the [envelope endpoint](https://develop.sentry.dev/sdk/envelopes/). If you are using self-hosted Sentry, the SDK requires Sentry version 20.6.0 and above. If you are using our SaaS product ([sentry.io](https://sentry.io)), no changes or actions needed.
238+
This version of the SDK uses the [envelope endpoint](https://develop.sentry.dev/sdk/envelopes/). If you're using self-hosted Sentry, the SDK requires Sentry version 20.6.0 and above. If you're using our SaaS product ([sentry.io](https://sentry.io)), no changes or actions are needed.
239239

240240
### iOS/MacOS
241241

242-
While the migration does not introduce breaking changes for iOS/MacOS on the React Native side, we recommend running `pod install` after the upgrade.
242+
While the migration doesn't introduce breaking changes for iOS/MacOS on the React Native side, we recommend running `pod install` after the upgrade.
243243

244244
<Note>
245245

246-
If you are using our Cocoa SDK directly, follow that [migration guide for 5.x to 6.x](/platforms/apple/migration/#migrating-from-5x-to-6x).
246+
If you're using our Cocoa SDK directly, follow the [migration guide for 5.x to 6.x](/platforms/apple/migration/#migrating-from-5x-to-6x).
247247

248248
</Note>
249249

250-
On iOS/MacOS, we now cache events in envelopes on the disk. As a result, you might lose a few cached events during the migration. Due to the effort involved, the migration from 5.x to 6.x does not move these few cached events into envelopes.
250+
On iOS/MacOS, we now cache events in envelopes on the disk. As a result, you might lose a few cached events during the migration. Due to the high level of effort involved, the migration from 5.x to 6.x won't move these few cached events into envelopes.
251251

252252
### Android
253253

254-
If you are on React Native &lt;0.60, you will need to update this line in your `MainApplication.java`:
254+
If you're on React Native &lt;0.60, you'll need to update this line in your `MainApplication.java`:
255255

256256
From (earlier version):
257257

@@ -273,7 +273,7 @@ import io.sentry.react.RNSentryPackage;
273273
import io.sentry.react.RNSentryPackage
274274
```
275275

276-
Other than the one line change noted above, the migration should not cause breaking changes on the React Native side.
276+
Other than the one line change noted above, the migration shouldn't cause breaking changes on the React Native side.
277277

278278
<Note>
279279
<markdown>
@@ -285,7 +285,7 @@ If you use our Android SDK directly, you should follow its [migration guide for
285285

286286
## From 0.x to 1.x
287287

288-
If you are upgrading from an earlier version of Sentry's React Native SDK, you should unlink the package to ensure the generated code is updated to the latest version:
288+
If you're upgrading from an earlier version of Sentry's React Native SDK, you should unlink the package to ensure the generated code is updated to the latest version:
289289

290290
```bash
291291
react-native unlink react-native-sentry
@@ -299,4 +299,4 @@ npm uninstall react-native-sentry --save
299299
yarn remove react-native-sentry
300300
```
301301

302-
From there you can follow the standard installation instructions for `@sentry/react-native`.
302+
From there, you can follow the standard installation instructions for `@sentry/react-native`.

0 commit comments

Comments
 (0)