Skip to content

Commit 7bb617a

Browse files
Fix React Native Onboarding Option Buttons (#12813)
1 parent d05d53f commit 7bb617a

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

docs/platforms/react-native/index.mdx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ Select which Sentry features you'd like to install in addition to Error Monitori
2525

2626
## Install
2727

28-
<OnboardingOptionButtons
29-
options={[
30-
'error-monitoring',
31-
'performance',
32-
'profiling',
33-
]}
34-
/>
35-
3628
Sentry captures data by using an SDK within your application's runtime. These are platform-specific and allow Sentry to have a deep understanding of how your application works.
3729

3830
To install, run `@sentry/wizard`:
@@ -62,18 +54,25 @@ If you're using Expo, [read our docs](/platforms/react-native/manual-setup/expo/
6254

6355
## Configure
6456

65-
To capture all errors, initialize the Sentry React Native SDK as soon as possible.
57+
<OnboardingOptionButtons
58+
options={[
59+
'error-monitoring',
60+
'performance',
61+
'profiling',
62+
]}
63+
/>
6664

65+
To capture all errors, initialize the Sentry React Native SDK as soon as possible.
6766

68-
```javascript {filename:App.js} {"onboardingOptions": {"performance": "5-7", "profiling": "8-10"}}
67+
```javascript {filename:App.js} {"onboardingOptions": {"performance": "5-9", "profiling": "10-12"}}
6968
import * as Sentry from "@sentry/react-native";
7069

7170
Sentry.init({
7271
dsn: "___PUBLIC_DSN___",
7372
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
7473
// We recommend adjusting this value in production.
7574
// Learn more at
76-
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
75+
// https://docs.sentry.io/platforms/react-native/configuration/options/#traces-sample-rate
7776
tracesSampleRate: 1.0,
7877
// profilesSampleRate is relative to tracesSampleRate.
7978
// Here, we'll capture profiles for 100% of transactions.

docs/platforms/react-native/manual-setup/expo.mdx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,30 @@ pnpm add @sentry/react-native
5656

5757
### Intialize the SDK
5858

59+
<OnboardingOptionButtons
60+
options={[
61+
'error-monitoring',
62+
'performance',
63+
'profiling',
64+
]}
65+
/>
66+
5967
Import the `@sentry/react-native` package and call `init` with your DSN:
6068

61-
```javascript {tabTitle:App.js or app/_layout.js}
69+
```javascript {tabTitle:App.js or app/_layout.js} {"onboardingOptions": {"performance": "6-10", "profiling": "11-13"}}
6270
import { Text, View } from "react-native";
6371
import * as Sentry from "@sentry/react-native";
6472

6573
Sentry.init({
66-
dsn: "___DSN___",
67-
68-
// Set tracesSampleRate to 1.0 to capture 100%
69-
// of transactions for tracing.
70-
// We recommend adjusting this value in production
74+
dsn: "___PUBLIC_DSN___",
75+
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
76+
// We recommend adjusting this value in production.
7177
// Learn more at
72-
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
78+
// https://docs.sentry.io/platforms/react-native/configuration/options/#traces-sample-rate
7379
tracesSampleRate: 1.0,
80+
// profilesSampleRate is relative to tracesSampleRate.
81+
// Here, we'll capture profiles for 100% of transactions.
82+
profilesSampleRate: 1.0,
7483
});
7584

7685
function App() {

0 commit comments

Comments
 (0)