From 3d8afcb30197bef33cdc28a074807db4186461fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Wold=C5=99ich?= <31292499+krystofwoldrich@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:14:10 +0200 Subject: [PATCH] feat(rn): Add Tracing without Performance docs (#7602) Co-authored-by: Abhijeet Prasad --- .../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 +++++++++++++ .../performance/enable-tracing/react-native.mdx | 10 +++++----- 6 files changed, 22 insertions(+), 9 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..354965e506903 --- /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. + +```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. diff --git a/src/platform-includes/performance/enable-tracing/react-native.mdx b/src/platform-includes/performance/enable-tracing/react-native.mdx index 0931ba195a242..0ede430f56784 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](/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"; @@ -15,3 +13,5 @@ Sentry.init({ integrations: [new Sentry.ReactNativeTracing()], }); ``` + +