From 48799f74b21345ecc1198c354963cb9bc70dc303 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 8 Aug 2023 10:31:20 +0200 Subject: [PATCH 1/4] feat(rn): Add Tracing without Performance docs --- .../distributed-tracing/how-to-use/javascript.mdx | 2 +- .../how-to-use/javascript.nextjs.mdx | 2 +- .../how-to-use/javascript.remix.mdx | 2 +- .../how-to-use/javascript.sveltekit.mdx | 2 +- .../distributed-tracing/how-to-use/react-native.mdx | 13 +++++++++++++ 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 src/platform-includes/distributed-tracing/how-to-use/react-native.mdx diff --git a/src/platform-includes/distributed-tracing/how-to-use/javascript.mdx b/src/platform-includes/distributed-tracing/how-to-use/javascript.mdx index 9550040056e66..1295ba94515c4 100644 --- a/src/platform-includes/distributed-tracing/how-to-use/javascript.mdx +++ b/src/platform-includes/distributed-tracing/how-to-use/javascript.mdx @@ -2,7 +2,7 @@ If you're using the current version of our JavaScript SDK and have enabled the ` ```js Sentry.init({ - dsn: "__DSN__", + dsn: "___PUBLIC_DSN___", integrations: [new Sentry.BrowserTracing()], tracePropagationTargets: [ "https://myproject.org", diff --git a/src/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx b/src/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx index 87fd669055e3e..f1c8c5a1d857d 100644 --- a/src/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx +++ b/src/platform-includes/distributed-tracing/how-to-use/javascript.nextjs.mdx @@ -5,7 +5,7 @@ For client-side you might have to define `tracePropagationTargets` to get around ```js // sentry.client.config.js Sentry.init({ - dsn: "__DSN__", + dsn: "___PUBLIC_DSN___", integrations: [new Sentry.BrowserTracing()], tracePropagationTargets: [ "https://myproject.org", diff --git a/src/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx b/src/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx index 7aba7b449843d..2ec65d62bb499 100644 --- a/src/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx +++ b/src/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx @@ -3,7 +3,7 @@ If you're using the current version of our Remix SDK, distributed tracing will w ```tsx // entry.client.tsx Sentry.init({ - dsn: "__DSN__", + dsn: "___PUBLIC_DSN___", integrations: [new Sentry.BrowserTracing()], tracePropagationTargets: [ "https://myproject.org", diff --git a/src/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx b/src/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx index 29e72fc938ccc..cb92eb0403ba4 100644 --- a/src/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx +++ b/src/platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx @@ -3,7 +3,7 @@ If you're using the current version of our SvelteKit SDK, distributed tracing wi ```js // hooks.client.js Sentry.init({ - dsn: "__DSN__", + dsn: "___PUBLIC_DSN___", integrations: [new BrowserTracing()], tracePropagationTargets: [ "https://myproject.org", diff --git a/src/platform-includes/distributed-tracing/how-to-use/react-native.mdx b/src/platform-includes/distributed-tracing/how-to-use/react-native.mdx new file mode 100644 index 0000000000000..0cf6d17a4fad1 --- /dev/null +++ b/src/platform-includes/distributed-tracing/how-to-use/react-native.mdx @@ -0,0 +1,13 @@ +If you're using the current version of our React Native SDK distributed tracing will work out of the box. To get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues, define your `tracePropagationTargets`. + +```js +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracePropagationTargets: [ + "https://myproject.org", + "https://.*.otherservice.org/.*", + ], +}); +``` + +If you're using version `5.9.x` or below, you'll need to have our performance monitoring feature enabled in order for distributed tracing to work. From cffc2a6d4577d8e822dbb19426b1db109448a796 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 8 Aug 2023 10:47:42 +0200 Subject: [PATCH 2/4] Hide older version enable tracing in expendable --- .../performance/enable-tracing/react-native.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform-includes/performance/enable-tracing/react-native.mdx b/src/platform-includes/performance/enable-tracing/react-native.mdx index 0931ba195a242..bad86d2be7cf0 100644 --- a/src/platform-includes/performance/enable-tracing/react-native.mdx +++ b/src/platform-includes/performance/enable-tracing/react-native.mdx @@ -1,10 +1,8 @@ - +Tracing is enabled by default in the React Native SDK. -If you use a version of our SDK prior to version `3.0.0`, you will need to include the `ReactNativeTracing` integration to use automatic instrumentation. You do not need to do this in versions `3.0.0` and above. - - + - +If you use a version of our SDK prior to version `3.0.0`, you will need to include the `ReactNativeTracing` integration to use automatic instrumentation. You do not need to do this in versions `3.0.0` and above. ```javascript import * as Sentry from "@sentry/react-native"; @@ -15,3 +13,5 @@ Sentry.init({ integrations: [new Sentry.ReactNativeTracing()], }); ``` + + From c672d8d0b76b545c2e86cabc4a406920185bc284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Wold=C5=99ich?= <31292499+krystofwoldrich@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:00:56 +0200 Subject: [PATCH 3/4] Update src/platform-includes/distributed-tracing/how-to-use/react-native.mdx Co-authored-by: Abhijeet Prasad --- .../distributed-tracing/how-to-use/react-native.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform-includes/distributed-tracing/how-to-use/react-native.mdx b/src/platform-includes/distributed-tracing/how-to-use/react-native.mdx index 0cf6d17a4fad1..354965e506903 100644 --- a/src/platform-includes/distributed-tracing/how-to-use/react-native.mdx +++ b/src/platform-includes/distributed-tracing/how-to-use/react-native.mdx @@ -1,4 +1,4 @@ -If you're using the current version of our React Native SDK distributed tracing will work out of the box. To get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues, define your `tracePropagationTargets`. +If you're using the current version of our React Native SDK distributed tracing will work out of the box. ```js Sentry.init({ From d8bbf4c06820f731e8ffdbe2eaf2c3f303a97e59 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Thu, 10 Aug 2023 17:02:11 +0200 Subject: [PATCH 4/4] add auto instrumentation link --- .../performance/enable-tracing/react-native.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform-includes/performance/enable-tracing/react-native.mdx b/src/platform-includes/performance/enable-tracing/react-native.mdx index bad86d2be7cf0..0ede430f56784 100644 --- a/src/platform-includes/performance/enable-tracing/react-native.mdx +++ b/src/platform-includes/performance/enable-tracing/react-native.mdx @@ -2,7 +2,7 @@ Tracing is enabled by default in the React Native SDK. -If you use a version of our SDK prior to version `3.0.0`, you will need to include the `ReactNativeTracing` integration to use automatic instrumentation. You do not need to do this in versions `3.0.0` and above. +If you use a version of our SDK prior to version `3.0.0`, you will need to include the `ReactNativeTracing` integration to use [automatic instrumentation](/platforms/react-native/performance/instrumentation/automatic-instrumentation/). You do not need to do this in versions `3.0.0` and above. ```javascript import * as Sentry from "@sentry/react-native";