From fdd310186b0610ae6214572d27cd576dbf097137 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Mon, 24 Feb 2025 13:11:46 +0100 Subject: [PATCH] Fix React Native Onboarding Option Buttons --- docs/platforms/react-native/index.mdx | 21 ++++++++--------- .../react-native/manual-setup/expo.mdx | 23 +++++++++++++------ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/docs/platforms/react-native/index.mdx b/docs/platforms/react-native/index.mdx index 116c3cbb56541..dc12e8efa9aa4 100644 --- a/docs/platforms/react-native/index.mdx +++ b/docs/platforms/react-native/index.mdx @@ -25,14 +25,6 @@ Select which Sentry features you'd like to install in addition to Error Monitori ## Install - - 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. To install, run `@sentry/wizard`: @@ -62,10 +54,17 @@ If you're using Expo, [read our docs](/platforms/react-native/manual-setup/expo/ ## Configure -To capture all errors, initialize the Sentry React Native SDK as soon as possible. + +To capture all errors, initialize the Sentry React Native SDK as soon as possible. -```javascript {filename:App.js} {"onboardingOptions": {"performance": "5-7", "profiling": "8-10"}} +```javascript {filename:App.js} {"onboardingOptions": {"performance": "5-9", "profiling": "10-12"}} import * as Sentry from "@sentry/react-native"; Sentry.init({ @@ -73,7 +72,7 @@ Sentry.init({ // Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing. // We recommend adjusting this value in production. // Learn more at - // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate + // https://docs.sentry.io/platforms/react-native/configuration/options/#traces-sample-rate tracesSampleRate: 1.0, // profilesSampleRate is relative to tracesSampleRate. // Here, we'll capture profiles for 100% of transactions. diff --git a/docs/platforms/react-native/manual-setup/expo.mdx b/docs/platforms/react-native/manual-setup/expo.mdx index 4490b783383b5..74669c7100b1c 100644 --- a/docs/platforms/react-native/manual-setup/expo.mdx +++ b/docs/platforms/react-native/manual-setup/expo.mdx @@ -56,21 +56,30 @@ pnpm add @sentry/react-native ### Intialize the SDK + + Import the `@sentry/react-native` package and call `init` with your DSN: -```javascript {tabTitle:App.js or app/_layout.js} +```javascript {tabTitle:App.js or app/_layout.js} {"onboardingOptions": {"performance": "6-10", "profiling": "11-13"}} import { Text, View } from "react-native"; import * as Sentry from "@sentry/react-native"; Sentry.init({ - dsn: "___DSN___", - - // Set tracesSampleRate to 1.0 to capture 100% - // of transactions for tracing. - // We recommend adjusting this value in production + dsn: "___PUBLIC_DSN___", + // Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing. + // We recommend adjusting this value in production. // Learn more at - // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate + // https://docs.sentry.io/platforms/react-native/configuration/options/#traces-sample-rate tracesSampleRate: 1.0, + // profilesSampleRate is relative to tracesSampleRate. + // Here, we'll capture profiles for 100% of transactions. + profilesSampleRate: 1.0, }); function App() {