From 3e6e08f5c6a4f4d0993602cdb54118fc7cfef679 Mon Sep 17 00:00:00 2001 From: Ryan Albrecht Date: Tue, 6 Dec 2022 20:07:48 -0800 Subject: [PATCH] Update Replay Wizard links and examples to link to docs and use correct field names --- .../replay-onboarding/angular/2.configure.md | 18 +++++----- .../replay-onboarding/ember/2.configure.md | 18 +++++----- .../replay-onboarding/gatsby/2.configure.md | 18 +++++----- .../replay-onboarding/nextjs/2.configure.md | 18 +++++----- .../replay-onboarding/react/2.configure.md | 18 +++++----- .../replay-onboarding/remix/2.configure.md | 18 +++++----- .../replay-onboarding/svelte/2.configure.md | 18 +++++----- .../replay-onboarding/vue/2.configure.md | 34 +++++++++++-------- 8 files changed, 89 insertions(+), 71 deletions(-) diff --git a/src/wizard/javascript/replay-onboarding/angular/2.configure.md b/src/wizard/javascript/replay-onboarding/angular/2.configure.md index 0167e894eae91..fb734e81ed4ec 100644 --- a/src/wizard/javascript/replay-onboarding/angular/2.configure.md +++ b/src/wizard/javascript/replay-onboarding/angular/2.configure.md @@ -7,7 +7,7 @@ type: language #### Configure -Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay in our Github [Readme](https://github.com/getsentry/sentry-replay/blob/main/README.md). +Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/guides/angular/session-replay/custom-instrumentation/). ```javascript import * as Sentry from "@sentry/angular"; @@ -15,14 +15,16 @@ import { Replay } from "@sentry/replay"; Sentry.init({ dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], }); ``` diff --git a/src/wizard/javascript/replay-onboarding/ember/2.configure.md b/src/wizard/javascript/replay-onboarding/ember/2.configure.md index 3f5617a2417b0..01685a877207f 100644 --- a/src/wizard/javascript/replay-onboarding/ember/2.configure.md +++ b/src/wizard/javascript/replay-onboarding/ember/2.configure.md @@ -7,7 +7,7 @@ type: language #### Configure -Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay in our Github [Readme](https://github.com/getsentry/sentry-replay/blob/main/README.md). +Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/guides/ember/session-replay/custom-instrumentation/). ```javascript import * as Sentry from "@sentry/ember"; @@ -15,14 +15,16 @@ import { Replay } from "@sentry/replay"; Sentry.init({ dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], }); ``` diff --git a/src/wizard/javascript/replay-onboarding/gatsby/2.configure.md b/src/wizard/javascript/replay-onboarding/gatsby/2.configure.md index 90a3858937dc8..accadf09a48e6 100644 --- a/src/wizard/javascript/replay-onboarding/gatsby/2.configure.md +++ b/src/wizard/javascript/replay-onboarding/gatsby/2.configure.md @@ -7,7 +7,7 @@ type: language #### Configure -Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay in our Github [Readme](https://github.com/getsentry/sentry-replay/blob/main/README.md). +Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/guides/gatsby/session-replay/custom-instrumentation/). Include the `@sentry/gatsby` plugin: @@ -29,14 +29,16 @@ import { Replay } from "@sentry/replay"; Sentry.init({ dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], }); ``` diff --git a/src/wizard/javascript/replay-onboarding/nextjs/2.configure.md b/src/wizard/javascript/replay-onboarding/nextjs/2.configure.md index db792f47b5033..9e37f86e1356d 100644 --- a/src/wizard/javascript/replay-onboarding/nextjs/2.configure.md +++ b/src/wizard/javascript/replay-onboarding/nextjs/2.configure.md @@ -7,7 +7,7 @@ type: language #### Configure -Add the following to your Client SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay in our Github [Readme](https://github.com/getsentry/sentry-replay/blob/main/README.md). +Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/guides/nextjs/session-replay/custom-instrumentation/). ```javascript {filename:sentry.client.config.js} import * as Sentry from "@sentry/nextjs"; @@ -15,14 +15,16 @@ import { Replay } from "@sentry/replay"; Sentry.init({ dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], }); ``` diff --git a/src/wizard/javascript/replay-onboarding/react/2.configure.md b/src/wizard/javascript/replay-onboarding/react/2.configure.md index 01fb0b2ed89aa..77e43690eaf9a 100644 --- a/src/wizard/javascript/replay-onboarding/react/2.configure.md +++ b/src/wizard/javascript/replay-onboarding/react/2.configure.md @@ -7,7 +7,7 @@ type: language #### Configure -Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay in our Github [Readme](https://github.com/getsentry/sentry-replay/blob/main/README.md). +Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/guides/react/session-replay/custom-instrumentation/). ```javascript import * as Sentry from "@sentry/react"; @@ -15,14 +15,16 @@ import { Replay } from "@sentry/replay"; Sentry.init({ dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], }); ``` diff --git a/src/wizard/javascript/replay-onboarding/remix/2.configure.md b/src/wizard/javascript/replay-onboarding/remix/2.configure.md index 9d071a546fc15..80d15fcf3e7d7 100644 --- a/src/wizard/javascript/replay-onboarding/remix/2.configure.md +++ b/src/wizard/javascript/replay-onboarding/remix/2.configure.md @@ -7,7 +7,7 @@ type: language #### Configure -Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay in our Github [Readme](https://github.com/getsentry/sentry-replay/blob/main/README.md). +Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/guides/remix/session-replay/custom-instrumentation/). ```javascript {filename: entry.client.tsx} import * as Sentry from "@sentry/remix"; @@ -15,14 +15,16 @@ import { Replay } from "@sentry/replay"; Sentry.init({ dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], }); ``` diff --git a/src/wizard/javascript/replay-onboarding/svelte/2.configure.md b/src/wizard/javascript/replay-onboarding/svelte/2.configure.md index bfa8529e79136..253b9d3b537d9 100644 --- a/src/wizard/javascript/replay-onboarding/svelte/2.configure.md +++ b/src/wizard/javascript/replay-onboarding/svelte/2.configure.md @@ -7,7 +7,7 @@ type: language #### Configure -Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay in our Github [Readme](https://github.com/getsentry/sentry-replay/blob/main/README.md). +Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/guides/svelte/session-replay/custom-instrumentation/). ```javascript import "./app.css"; @@ -18,14 +18,16 @@ import { Replay } from "@sentry/replay"; Sentry.init({ dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], }); diff --git a/src/wizard/javascript/replay-onboarding/vue/2.configure.md b/src/wizard/javascript/replay-onboarding/vue/2.configure.md index 659e14f47d480..afa4fc9d19bd3 100644 --- a/src/wizard/javascript/replay-onboarding/vue/2.configure.md +++ b/src/wizard/javascript/replay-onboarding/vue/2.configure.md @@ -7,7 +7,7 @@ type: language #### Configure -Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay in our Github [Readme](https://github.com/getsentry/sentry-replay/blob/main/README.md). +Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set via the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/guides/vue/session-replay/custom-instrumentation/). #### Vue 2 @@ -26,14 +26,16 @@ const router = new Router({ Sentry.init({ Vue, dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], }); @@ -63,14 +65,16 @@ const router = createRouter({ Sentry.init({ app, dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", - integrations: [ - new Replay({ - // Capture 10% of all sessions - sessionSampleRate: 0.1, - // Of the remaining 90% of sessions, if an error happens start capturing - errorSampleRate: 1.0, - }) + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + integrations: [ + new Replay() ], });