diff --git a/src/platform-includes/getting-started-config/javascript.angular.mdx b/src/platform-includes/getting-started-config/javascript.angular.mdx index d7da8473dcbb6..39685305682f0 100644 --- a/src/platform-includes/getting-started-config/javascript.angular.mdx +++ b/src/platform-includes/getting-started-config/javascript.angular.mdx @@ -13,8 +13,6 @@ 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, @@ -27,6 +25,9 @@ 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, @@ -52,8 +53,6 @@ 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, }), ], @@ -62,6 +61,9 @@ 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.mdx b/src/platform-includes/getting-started-config/javascript.mdx index a51a2a85e47d9..0703796a5dbe1 100644 --- a/src/platform-includes/getting-started-config/javascript.mdx +++ b/src/platform-includes/getting-started-config/javascript.mdx @@ -9,19 +9,16 @@ 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({ - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - }), - new Sentry.Replay(), - ], + integrations: [new Sentry.BrowserTracing(), 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 bd915a1d52056..ace0287cb8e93 100644 --- a/src/platform-includes/getting-started-config/javascript.react.mdx +++ b/src/platform-includes/getting-started-config/javascript.react.mdx @@ -9,8 +9,6 @@ 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( @@ -28,6 +26,9 @@ 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 4982b64280a93..c330f26876bc5 100644 --- a/src/platform-includes/getting-started-config/javascript.remix.mdx +++ b/src/platform-includes/getting-started-config/javascript.remix.mdx @@ -13,8 +13,6 @@ Sentry.init({ dsn: "___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, @@ -30,6 +28,9 @@ 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 8c49b09948592..06ef46a7c8668 100644 --- a/src/platform-includes/getting-started-config/javascript.svelte.mdx +++ b/src/platform-includes/getting-started-config/javascript.svelte.mdx @@ -9,19 +9,16 @@ import * as Sentry from "@sentry/svelte"; // Initialize the Sentry SDK here 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/], - }), - new Sentry.Replay(), - ], + integrations: [new Sentry.BrowserTracing(), 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 28438764d8c59..e7c92a5261eec 100644 --- a/src/platform-includes/getting-started-config/javascript.vue.mdx +++ b/src/platform-includes/getting-started-config/javascript.vue.mdx @@ -19,8 +19,6 @@ 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(), @@ -31,6 +29,9 @@ 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, @@ -59,8 +60,6 @@ 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(), @@ -71,6 +70,9 @@ 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 d37d9eea6ddd2..2b2753af19c36 100644 --- a/src/platform-includes/performance/configure-sample-rate/javascript.mdx +++ b/src/platform-includes/performance/configure-sample-rate/javascript.mdx @@ -11,15 +11,13 @@ 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({ - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - }), - ], + integrations: [new Sentry.BrowserTracing()], // 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 7cede1adae3a4..8496e0b7537d4 100644 --- a/src/platform-includes/performance/configure-sample-rate/javascript.react.mdx +++ b/src/platform-includes/performance/configure-sample-rate/javascript.react.mdx @@ -11,8 +11,6 @@ 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( @@ -28,5 +26,8 @@ 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/tracePropagationTargets-example/javascript.mdx b/src/platform-includes/performance/tracePropagationTargets-example/javascript.mdx index a985e9d3df9a2..6db411b0ed74d 100644 --- a/src/platform-includes/performance/tracePropagationTargets-example/javascript.mdx +++ b/src/platform-includes/performance/tracePropagationTargets-example/javascript.mdx @@ -10,10 +10,9 @@ For example: ```javascript Sentry.init({ // ... - integrations: [ - new Sentry.BrowserTracing({ - tracePropagationTargets: ["localhost", /^https:\/\/api\.example\.com/], - }), - ], + 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/platforms/javascript/common/install/loader.mdx b/src/platforms/javascript/common/install/loader.mdx index 565ecca308ff0..d2746f70650e1 100644 --- a/src/platforms/javascript/common/install/loader.mdx +++ b/src/platforms/javascript/common/install/loader.mdx @@ -186,10 +186,7 @@ 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({ - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], - }), + new Sentry.BrowserTracing(), // If you use a bundle with session replay enabled, add the SessionReplay integration new Sentry.Replay(), ], @@ -197,6 +194,9 @@ 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 f59cdf583b80a..f084649047c66 100644 --- a/src/wizard/javascript/angular/index.md +++ b/src/wizard/javascript/angular/index.md @@ -38,8 +38,6 @@ 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, }), ], @@ -48,6 +46,9 @@ 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 9fc1fc7bd3a74..e1cb36576bb23 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,14 +42,16 @@ 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(), ], + // 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/gatsby/with-error-monitoring-performance-and-replay.md b/src/wizard/javascript/gatsby/with-error-monitoring-performance-and-replay.md index 2494517450cc3..d53468aed5dcd 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,15 +38,13 @@ import * as Sentry from "@sentry/gatsby"; 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/], - }), - new Sentry.Replay(), - ], + integrations: [new Sentry.BrowserTracing(), 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/index.md b/src/wizard/javascript/index.md index c105ad5fd8dc2..dfce34ecd9859 100644 --- a/src/wizard/javascript/index.md +++ b/src/wizard/javascript/index.md @@ -23,17 +23,15 @@ import * as Sentry from "@sentry/browser"; 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/], - }), - ], + integrations: [new Sentry.BrowserTracing()], // 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 c784386a76eb6..9b77641682ff1 100644 --- a/src/wizard/javascript/nextjs/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/nextjs/with-error-monitoring-and-performance.md @@ -36,14 +36,12 @@ npm install --save @sentry/nextjs ```javascript 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/], - }), - ], + integrations: [new Sentry.BrowserTracing()], + // 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 77e4a6761f148..a5146674b9c2a 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,15 +36,13 @@ npm install --save @sentry/nextjs ```javascript 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/], - }), - new Sentry.Replay(), - ], + integrations: [new Sentry.BrowserTracing(), 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/performance-onboarding/react/2.configure.md b/src/wizard/javascript/performance-onboarding/react/2.configure.md index 37add493f96f6..187788b373317 100644 --- a/src/wizard/javascript/performance-onboarding/react/2.configure.md +++ b/src/wizard/javascript/performance-onboarding/react/2.configure.md @@ -17,17 +17,14 @@ import App from "./App"; 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/], - }), - ], + integrations: [new Sentry.BrowserTracing()], // 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 f27dc8dc7debe..31e2451cc948f 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,13 @@ import App from "./App"; 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/], - }), + new Sentry.BrowserTracing(), ], + // 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 b6dee12b3f0bd..051b2aa546aec 100644 --- a/src/wizard/javascript/remix/index.md +++ b/src/wizard/javascript/remix/index.md @@ -24,11 +24,9 @@ import { useEffect } from "react"; Sentry.init({ dsn: "___DSN___", - tracesSampleRate: 1, + 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, @@ -36,6 +34,11 @@ 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 04881c79f6d79..8b321945da405 100644 --- a/src/wizard/javascript/remix/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/remix/with-error-monitoring-and-performance.md @@ -30,8 +30,6 @@ Sentry.init({ dsn: "___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, @@ -39,8 +37,11 @@ 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 0afe0589f852a..3c91711431f24 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,8 +30,6 @@ Sentry.init({ dsn: "___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 +38,11 @@ Sentry.init({ }), 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/svelte/with-error-monitoring-and-performance.md b/src/wizard/javascript/svelte/with-error-monitoring-and-performance.md index 2cfb0b0534869..06056346567c7 100644 --- a/src/wizard/javascript/svelte/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/svelte/with-error-monitoring-and-performance.md @@ -29,14 +29,12 @@ import * as Sentry from "@sentry/svelte"; 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/], - }), - ], + integrations: [new Sentry.BrowserTracing()], + // 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 ae6ef715b8b24..9d198264b95d3 100644 --- a/src/wizard/javascript/vue/index.md +++ b/src/wizard/javascript/vue/index.md @@ -42,15 +42,16 @@ 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), }), ], + // 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/], }); app.use(router); @@ -75,8 +76,6 @@ 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), }), ], @@ -84,6 +83,8 @@ 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 2c62c537fad37..4d3035f81eb3c 100644 --- a/src/wizard/javascript/vue/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/vue/with-error-monitoring-and-performance.md @@ -40,13 +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); @@ -71,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 6266533ea1f5c..a757abfa3fd33 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 00dd31d7ecfe8..9ce2a45cd57a5 100644 --- a/src/wizard/javascript/with-error-monitoring-and-performance.md +++ b/src/wizard/javascript/with-error-monitoring-and-performance.md @@ -25,14 +25,13 @@ import * as Sentry from "@sentry/browser"; 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/], - }), - ], + integrations: [new Sentry.BrowserTracing()], + // 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/], }); ```