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 9550040056e66e..cbb951299b06aa 100644 --- a/src/platform-includes/distributed-tracing/how-to-use/javascript.mdx +++ b/src/platform-includes/distributed-tracing/how-to-use/javascript.mdx @@ -3,10 +3,14 @@ If you're using the current version of our JavaScript SDK and have enabled the ` ```js Sentry.init({ dsn: "__DSN__", - integrations: [new Sentry.BrowserTracing()], - tracePropagationTargets: [ - "https://myproject.org", - "https://.*.otherservice.org/.*", + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: [ + "https://myproject.org", + "https://.*.otherservice.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 87fd669055e3e5..b688f86e5c893f 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 @@ -6,10 +6,14 @@ For client-side you might have to define `tracePropagationTargets` to get around // sentry.client.config.js Sentry.init({ dsn: "__DSN__", - integrations: [new Sentry.BrowserTracing()], - tracePropagationTargets: [ - "https://myproject.org", - "https://.*.otherservice.org/.*", + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: [ + "https://myproject.org", + "https://.*.otherservice.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 7aba7b449843dc..e42e5dea684250 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 @@ -4,10 +4,14 @@ If you're using the current version of our Remix SDK, distributed tracing will w // entry.client.tsx Sentry.init({ dsn: "__DSN__", - integrations: [new Sentry.BrowserTracing()], - tracePropagationTargets: [ - "https://myproject.org", - "https://.*.otherservice.org/.*", + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: [ + "https://myproject.org", + "https://.*.otherservice.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 29e72fc938cccd..2cc68821d4a82b 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 @@ -4,10 +4,14 @@ If you're using the current version of our SvelteKit SDK, distributed tracing wi // hooks.client.js Sentry.init({ dsn: "__DSN__", - integrations: [new BrowserTracing()], - tracePropagationTargets: [ - "https://myproject.org", - "https://.*.otherservice.org/.*", + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: [ + "https://myproject.org", + "https://.*.otherservice.org/.*", + ], + }), ], }); ``` diff --git a/src/platform-includes/distributed-tracing/limiting-traces/javascript.mdx b/src/platform-includes/distributed-tracing/limiting-traces/javascript.mdx index 200567823746ba..c8d612d5b5d4d4 100644 --- a/src/platform-includes/distributed-tracing/limiting-traces/javascript.mdx +++ b/src/platform-includes/distributed-tracing/limiting-traces/javascript.mdx @@ -1,10 +1,14 @@ ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing()], - tracePropagationTargets: [ - "https://myproject.org", - "https://.*.otherservice.org/.*", + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled“ + tracePropagationTargets: [ + "https://myproject.org", + "https://.*.otherservice.org/.*", + ], + }), ], }); ``` diff --git a/src/platform-includes/getting-started-config/javascript.angular.mdx b/src/platform-includes/getting-started-config/javascript.angular.mdx index 39685305682f04..d7da8473dcbb68 100644 --- a/src/platform-includes/getting-started-config/javascript.angular.mdx +++ b/src/platform-includes/getting-started-config/javascript.angular.mdx @@ -13,6 +13,8 @@ Sentry.init({ // which automatically instruments your application to monitor its // performance, including custom Angular routing instrumentation new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.routingInstrumentation, }), // Registers the Replay integration, @@ -25,9 +27,6 @@ Sentry.init({ // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Capture Replay for 10% of all sessions, // plus for 100% of sessions with an error replaysSessionSampleRate: 0.1, @@ -53,6 +52,8 @@ Sentry.init({ // which automatically instruments your application to monitor its // performance, including custom Angular routing instrumentation new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.routingInstrumentation, }), ], @@ -61,9 +62,6 @@ Sentry.init({ // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, - - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); platformBrowserDynamic() diff --git a/src/platform-includes/getting-started-config/javascript.capacitor.mdx b/src/platform-includes/getting-started-config/javascript.capacitor.mdx index db0bf337b11b6f..0d8cd8822e1bc5 100644 --- a/src/platform-includes/getting-started-config/javascript.capacitor.mdx +++ b/src/platform-includes/getting-started-config/javascript.capacitor.mdx @@ -18,6 +18,7 @@ Sentry.init( // which automatically instruments your application to monitor its // performance, including custom Angular routing instrumentation new SentryAngular.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled tracePropagationTargets: ["localhost", "https://yourserver.io/api"], routingInstrumentation: SentryAngular.routingInstrumentation, }), diff --git a/src/platform-includes/getting-started-config/javascript.mdx b/src/platform-includes/getting-started-config/javascript.mdx index 0703796a5dbe12..a51a2a85e47d95 100644 --- a/src/platform-includes/getting-started-config/javascript.mdx +++ b/src/platform-includes/getting-started-config/javascript.mdx @@ -9,16 +9,19 @@ Sentry.init({ // Alternatively, use `process.env.npm_package_version` for a dynamic release version // if your build tool supports it. release: "my-project-name@2.3.12", - integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + new Sentry.Replay(), + ], // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Capture Replay for 10% of all sessions, // plus for 100% of sessions with an error replaysSessionSampleRate: 0.1, diff --git a/src/platform-includes/getting-started-config/javascript.react.mdx b/src/platform-includes/getting-started-config/javascript.react.mdx index ace0287cb8e93e..bd915a1d520562 100644 --- a/src/platform-includes/getting-started-config/javascript.react.mdx +++ b/src/platform-includes/getting-started-config/javascript.react.mdx @@ -9,6 +9,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], // See docs for support of different versions of variation of react router // https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/ routingInstrumentation: Sentry.reactRouterV6Instrumentation( @@ -26,9 +28,6 @@ Sentry.init({ // of transactions for performance monitoring. tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Capture Replay for 10% of all sessions, // plus for 100% of sessions with an error replaysSessionSampleRate: 0.1, diff --git a/src/platform-includes/getting-started-config/javascript.remix.mdx b/src/platform-includes/getting-started-config/javascript.remix.mdx index a0d3351647b56c..0177efcd85609a 100644 --- a/src/platform-includes/getting-started-config/javascript.remix.mdx +++ b/src/platform-includes/getting-started-config/javascript.remix.mdx @@ -13,6 +13,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.remixRouterInstrumentation( useEffect, useLocation, @@ -28,9 +30,6 @@ Sentry.init({ // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Capture Replay for 10% of all sessions, // plus for 100% of sessions with an error replaysSessionSampleRate: 0.1, diff --git a/src/platform-includes/getting-started-config/javascript.svelte.mdx b/src/platform-includes/getting-started-config/javascript.svelte.mdx index 06ef46a7c8668e..8c49b099485921 100644 --- a/src/platform-includes/getting-started-config/javascript.svelte.mdx +++ b/src/platform-includes/getting-started-config/javascript.svelte.mdx @@ -9,16 +9,19 @@ import * as Sentry from "@sentry/svelte"; // Initialize the Sentry SDK here Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + new Sentry.Replay(), + ], // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Capture Replay for 10% of all sessions, // plus for 100% of sessions with an error replaysSessionSampleRate: 0.1, diff --git a/src/platform-includes/getting-started-config/javascript.vue.mdx b/src/platform-includes/getting-started-config/javascript.vue.mdx index e7c92a5261eece..28438764d8c59c 100644 --- a/src/platform-includes/getting-started-config/javascript.vue.mdx +++ b/src/platform-includes/getting-started-config/javascript.vue.mdx @@ -19,6 +19,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), new Sentry.Replay(), @@ -29,9 +31,6 @@ Sentry.init({ // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Capture Replay for 10% of all sessions, // plus for 100% of sessions with an error replaysSessionSampleRate: 0.1, @@ -60,6 +59,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), new Sentry.Replay(), @@ -70,9 +71,6 @@ Sentry.init({ // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - // Capture Replay for 10% of all sessions, // plus for 100% of sessions with an error replaysSessionSampleRate: 0.1, diff --git a/src/platform-includes/performance/configure-sample-rate/javascript.mdx b/src/platform-includes/performance/configure-sample-rate/javascript.mdx index 2b2753af19c36f..d37d9eea6ddd25 100644 --- a/src/platform-includes/performance/configure-sample-rate/javascript.mdx +++ b/src/platform-includes/performance/configure-sample-rate/javascript.mdx @@ -11,13 +11,15 @@ Sentry.init({ // If you only want to use custom instrumentation: // * Remove the `BrowserTracing` integration // * add `Sentry.addTracingExtensions()` above your Sentry.init() call - integrations: [new Sentry.BrowserTracing()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + ], // We recommend adjusting this value in production, or using tracesSampler // for finer control tracesSampleRate: 1.0, - - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ``` diff --git a/src/platform-includes/performance/configure-sample-rate/javascript.react.mdx b/src/platform-includes/performance/configure-sample-rate/javascript.react.mdx index 8496e0b7537d47..7cede1adae3a44 100644 --- a/src/platform-includes/performance/configure-sample-rate/javascript.react.mdx +++ b/src/platform-includes/performance/configure-sample-rate/javascript.react.mdx @@ -11,6 +11,8 @@ Sentry.init({ // * add `Sentry.addTracingExtensions()` above your Sentry.init() call integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], // See docs for support of different versions of variation of react router // https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/ routingInstrumentation: Sentry.reactRouterV6Instrumentation( @@ -26,8 +28,5 @@ Sentry.init({ // For finer control of sent transactions you can adjust this value, or // use tracesSampler tracesSampleRate: 1.0, - - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ``` diff --git a/src/platform-includes/performance/configure-sample-rate/javascript.vue.mdx b/src/platform-includes/performance/configure-sample-rate/javascript.vue.mdx index f286fb8566d70b..18be5b12fb114a 100644 --- a/src/platform-includes/performance/configure-sample-rate/javascript.vue.mdx +++ b/src/platform-includes/performance/configure-sample-rate/javascript.vue.mdx @@ -12,13 +12,16 @@ Sentry.init({ // If you only want to use custom instrumentation: // * Remove the `BrowserTracing` integration // * add `Sentry.addTracingExtensions()` above your Sentry.init() call - integrations: [new Sentry.BrowserTracing()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + ], // We recommend adjusting this value in production, or using tracesSampler // for finer control tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ``` diff --git a/src/platform-includes/performance/tracePropagationTargets-example/javascript.mdx b/src/platform-includes/performance/tracePropagationTargets-example/javascript.mdx index 6db411b0ed74d7..98e31b5163b44d 100644 --- a/src/platform-includes/performance/tracePropagationTargets-example/javascript.mdx +++ b/src/platform-includes/performance/tracePropagationTargets-example/javascript.mdx @@ -10,9 +10,11 @@ For example: ```javascript Sentry.init({ // ... - integrations: [new Sentry.BrowserTracing()], - - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + ], }); ``` diff --git a/src/platform-includes/performance/tracePropagationTargets-example/react-native.mdx b/src/platform-includes/performance/tracePropagationTargets-example/react-native.mdx index d43514d0237160..69ede22de456a6 100644 --- a/src/platform-includes/performance/tracePropagationTargets-example/react-native.mdx +++ b/src/platform-includes/performance/tracePropagationTargets-example/react-native.mdx @@ -11,6 +11,7 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.ReactNativeTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled tracePropagationTargets: ["localhost", "my-site-url.com"], }), ], diff --git a/src/platforms/javascript/common/install/loader.mdx b/src/platforms/javascript/common/install/loader.mdx index d2746f70650e1f..565ecca308ff06 100644 --- a/src/platforms/javascript/common/install/loader.mdx +++ b/src/platforms/javascript/common/install/loader.mdx @@ -186,7 +186,10 @@ Sentry.init({ release: "my-project-name@" + process.env.npm_package_version, integrations: [ // If you use a bundle with performance monitoring enabled, add the BrowserTracing integration - new Sentry.BrowserTracing(), + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), // If you use a bundle with session replay enabled, add the SessionReplay integration new Sentry.Replay(), ], @@ -194,9 +197,6 @@ Sentry.init({ // We recommend adjusting this value in production, or using tracesSampler // for finer control tracesSampleRate: 1.0, - - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ``` diff --git a/src/wizard/javascript/angular/index.md b/src/wizard/javascript/angular/index.md index f084649047c669..f59cdf583b80ac 100644 --- a/src/wizard/javascript/angular/index.md +++ b/src/wizard/javascript/angular/index.md @@ -38,6 +38,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.routingInstrumentation, }), ], @@ -46,9 +48,6 @@ Sentry.init({ // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, - - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); enableProdMode(); diff --git a/src/wizard/javascript/angular/with-error-monitoring-performance-and-replay.md b/src/wizard/javascript/angular/with-error-monitoring-performance-and-replay.md index e1cb36576bb235..52d9d351fa7c46 100644 --- a/src/wizard/javascript/angular/with-error-monitoring-performance-and-replay.md +++ b/src/wizard/javascript/angular/with-error-monitoring-performance-and-replay.md @@ -42,6 +42,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.routingInstrumentation, }), new Sentry.Replay(), @@ -49,8 +51,6 @@ Sentry.init({ // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], // Session Replay replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. diff --git a/src/wizard/javascript/gatsby/with-error-monitoring-performance-and-replay.md b/src/wizard/javascript/gatsby/with-error-monitoring-performance-and-replay.md index d53468aed5dcd0..173e45f8874573 100644 --- a/src/wizard/javascript/gatsby/with-error-monitoring-performance-and-replay.md +++ b/src/wizard/javascript/gatsby/with-error-monitoring-performance-and-replay.md @@ -38,12 +38,16 @@ import * as Sentry from "@sentry/gatsby"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + new Sentry.Replay(), + ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], // Session Replay replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. diff --git a/src/wizard/javascript/index.md b/src/wizard/javascript/index.md index dfce34ecd98597..c105ad5fd8dc21 100644 --- a/src/wizard/javascript/index.md +++ b/src/wizard/javascript/index.md @@ -23,15 +23,17 @@ import * as Sentry from "@sentry/browser"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + ], // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, - - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ``` diff --git a/src/wizard/javascript/nextjs/with-error-monitoring-and-performance.md b/src/wizard/javascript/nextjs/with-error-monitoring-and-performance.md index 9b77641682ff14..a70d21bd2e9bf8 100644 --- a/src/wizard/javascript/nextjs/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/nextjs/with-error-monitoring-and-performance.md @@ -36,12 +36,15 @@ npm install --save @sentry/nextjs ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ``` diff --git a/src/wizard/javascript/nextjs/with-error-monitoring-performance-and-replay.md b/src/wizard/javascript/nextjs/with-error-monitoring-performance-and-replay.md index a5146674b9c2a0..4ba16b93bffeb7 100644 --- a/src/wizard/javascript/nextjs/with-error-monitoring-performance-and-replay.md +++ b/src/wizard/javascript/nextjs/with-error-monitoring-performance-and-replay.md @@ -36,12 +36,16 @@ npm install --save @sentry/nextjs ```javascript Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + new Sentry.Replay(), + ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], // Session Replay replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. diff --git a/src/wizard/javascript/performance-onboarding/react/2.configure.md b/src/wizard/javascript/performance-onboarding/react/2.configure.md index 187788b373317a..7cc67cab794d84 100644 --- a/src/wizard/javascript/performance-onboarding/react/2.configure.md +++ b/src/wizard/javascript/performance-onboarding/react/2.configure.md @@ -17,14 +17,15 @@ import App from "./App"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing()], + integrations: [new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + })], // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ReactDOM.render(, document.getElementById("root")); diff --git a/src/wizard/javascript/react/with-error-monitoring-and-performance.md b/src/wizard/javascript/react/with-error-monitoring-and-performance.md index 31e2451cc948fc..ad581cbaf24bda 100644 --- a/src/wizard/javascript/react/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/react/with-error-monitoring-and-performance.md @@ -30,13 +30,14 @@ import App from "./App"; Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ - new Sentry.BrowserTracing(), + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); const container = document.getElementById(“app”); diff --git a/src/wizard/javascript/remix/index.md b/src/wizard/javascript/remix/index.md index a59377886a4c6d..437d2d2973977b 100644 --- a/src/wizard/javascript/remix/index.md +++ b/src/wizard/javascript/remix/index.md @@ -26,6 +26,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.remixRouterInstrumentation( useEffect, useLocation, @@ -35,8 +37,6 @@ Sentry.init({ ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ``` diff --git a/src/wizard/javascript/remix/with-error-monitoring-and-performance.md b/src/wizard/javascript/remix/with-error-monitoring-and-performance.md index 66347e432a4e36..e35fe21e093b8f 100644 --- a/src/wizard/javascript/remix/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/remix/with-error-monitoring-and-performance.md @@ -30,6 +30,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.remixRouterInstrumentation( useEffect, useLocation, @@ -40,8 +42,6 @@ Sentry.init({ // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ``` diff --git a/src/wizard/javascript/remix/with-error-monitoring-performance-and-replay.md b/src/wizard/javascript/remix/with-error-monitoring-performance-and-replay.md index c1c52a9d0e514c..6025a9383ffecf 100644 --- a/src/wizard/javascript/remix/with-error-monitoring-performance-and-replay.md +++ b/src/wizard/javascript/remix/with-error-monitoring-performance-and-replay.md @@ -30,6 +30,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.remixRouterInstrumentation( useEffect, useLocation, @@ -41,8 +43,6 @@ Sentry.init({ // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], // Session Replay replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur. diff --git a/src/wizard/javascript/svelte/with-error-monitoring-and-performance.md b/src/wizard/javascript/svelte/with-error-monitoring-and-performance.md index 06056346567c70..dad560d61095d4 100644 --- a/src/wizard/javascript/svelte/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/svelte/with-error-monitoring-and-performance.md @@ -29,12 +29,15 @@ import * as Sentry from "@sentry/svelte"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); const app = new App({ diff --git a/src/wizard/javascript/vue/index.md b/src/wizard/javascript/vue/index.md index 9d198264b95d35..f6bb35fd04766b 100644 --- a/src/wizard/javascript/vue/index.md +++ b/src/wizard/javascript/vue/index.md @@ -42,6 +42,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), ], @@ -50,8 +52,6 @@ Sentry.init({ // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); app.use(router); @@ -76,6 +76,8 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), ], @@ -83,8 +85,6 @@ Sentry.init({ // of transactions for performance monitoring. // We recommend adjusting this value in production tracesSampleRate: 1.0, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); // ... diff --git a/src/wizard/javascript/vue/with-error-monitoring-and-performance.md b/src/wizard/javascript/vue/with-error-monitoring-and-performance.md index 4d3035f81eb3c7..2d555961dd140b 100644 --- a/src/wizard/javascript/vue/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/vue/with-error-monitoring-and-performance.md @@ -40,14 +40,14 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); app.use(router); @@ -72,13 +72,13 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); // ... diff --git a/src/wizard/javascript/vue/with-error-monitoring-performance-and-replay.md b/src/wizard/javascript/vue/with-error-monitoring-performance-and-replay.md index a757abfa3fd332..6266533ea1f5c6 100644 --- a/src/wizard/javascript/vue/with-error-monitoring-performance-and-replay.md +++ b/src/wizard/javascript/vue/with-error-monitoring-performance-and-replay.md @@ -75,14 +75,14 @@ Sentry.init({ dsn: "___PUBLIC_DSN___", integrations: [ new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), new Sentry.Replay(), ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], // Session Replay replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur. diff --git a/src/wizard/javascript/with-error-monitoring-and-performance.md b/src/wizard/javascript/with-error-monitoring-and-performance.md index 9ce2a45cd57a56..00852d0ac1acbf 100644 --- a/src/wizard/javascript/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/with-error-monitoring-and-performance.md @@ -25,13 +25,15 @@ import * as Sentry from "@sentry/browser"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new Sentry.BrowserTracing()], + integrations: [ + new Sentry.BrowserTracing({ + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + }), + ], // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], }); ```