Skip to content

Commit 50fe3db

Browse files
authored
ref(replay): Update Replay installation with SDK-package import (#5971)
This PR updates the Session Replay docs after we released version 7.27.0 of the JS SDKs. With this new version, users don't need to explicitly install `@sentry/replay` anymore, as it is now a dependency of `@sentry/browser` which [exports the Replay integration](getsentry/sentry-javascript#6508). * Update the session replay setup page * Update the session replay onboarding wizard ref #getsentry/sentry-javascript#6326 Note: I'd like to keep this PR open for a few days (Monday or so) just to make sure 7.27.0 isn't breaking anything
1 parent 9c47aca commit 50fe3db

File tree

20 files changed

+38
-70
lines changed

20 files changed

+38
-70
lines changed

src/platform-includes/session-replay/install/javascript.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
Install the Replay package with the package manager of your choice. Alternatively, you can load the Replay integration using a CDN bundle:
1+
The Replay integration is **already included** in your browser or framework SDK NPM packages. If you're using CDN bundles instead of NPM packages, you need to load the Replay integration CDN bundle in addition to your browser bundle:
22

3-
```bash {tabTitle: ESM}
3+
```bash {tabTitle: NPM}
44
# Make sure to have @sentry/browser or a Framework SDK (e.g. @sentry/react) installed
5+
npm install --save @sentry/browser
6+
```
57

6-
# Using yarn
7-
yarn add @sentry/replay
8-
9-
# Using npm
10-
npm install --save @sentry/replay
8+
```bash {tabTitle: Yarn}
9+
# Make sure to have @sentry/browser or a Framework SDK (e.g. @sentry/react) installed
10+
yarn add @sentry/browser
1111
```
1212

1313
```html {tabTitle: CDN}
@@ -17,7 +17,7 @@ entire Sentry SDK. You have to add it in addition to the Sentry Browser SDK bund
1717
-->
1818

1919
<script
20-
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.min.js"
20+
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.tracing.min.js"
2121
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.min.js', 'sha384-base64') }}"
2222
crossorigin="anonymous"
2323
></script>

src/platform-includes/session-replay/setup/javascript.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ To set up the integration, add the following to your Sentry initialization. Seve
44
// import Sentry from your framework SDK (e.g. @sentry/react) instead of @sentry/browser
55
import * as Sentry from "@sentry/browser";
66

7-
import { Replay } from "@sentry/replay";
8-
97
Sentry.init({
108
dsn: "___PUBLIC_DSN___",
119

@@ -18,11 +16,10 @@ Sentry.init({
1816
replaysOnErrorSampleRate: 1.0,
1917

2018
integrations: [
21-
new Replay({
19+
new Sentry.Replay({
2220
// Additional SDK configuration goes in here, for example:
2321
maskAllText: true,
2422
blockAllMedia: true,
25-
// See below for all available options
2623
}),
2724
],
2825
});
@@ -45,7 +42,6 @@ Sentry.init({
4542
// Additional SDK configuration goes in here, for example:
4643
maskAllText: true,
4744
blockAllMedia: true,
48-
// See below for all available options
4945
}),
5046
],
5147
});

src/wizard/javascript/replay-onboarding/angular/1.install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For the `@sentry/replay` integration to work, you must have the Sentry browser S
1111

1212
```bash
1313
# Using yarn
14-
yarn add @sentry/angular @sentry/replay
14+
yarn add @sentry/angular
1515

1616
# Using npm
17-
npm install --save @sentry/angular @sentry/replay
17+
npm install --save @sentry/angular
1818
```

src/wizard/javascript/replay-onboarding/angular/2.configure.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Add the following to your SDK config. There are several privacy and sampling opt
1111

1212
```javascript
1313
import * as Sentry from "@sentry/angular";
14-
import { Replay } from "@sentry/replay";
1514

1615
Sentry.init({
1716
dsn: "___PUBLIC_DSN___",
@@ -23,8 +22,6 @@ Sentry.init({
2322
// sessions when an error occurs.
2423
replaysOnErrorSampleRate: 1.0,
2524

26-
integrations: [
27-
new Replay()
28-
],
25+
integrations: [new Sentry.Replay()],
2926
});
3027
```

src/wizard/javascript/replay-onboarding/ember/1.install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ type: language
1010
For the `@sentry/replay` integration to work, you must have the Sentry browser SDK package, or an equivalent framework SDK (e.g. @sentry/react) installed, minimum version 7.x.
1111

1212
```bash {tabTitle:ember-cli}
13-
ember install @sentry/ember @sentry/replay
13+
ember install @sentry/ember
1414
```

src/wizard/javascript/replay-onboarding/ember/2.configure.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ Sentry.init({
2323
// sessions when an error occurs.
2424
replaysOnErrorSampleRate: 1.0,
2525

26-
integrations: [
27-
new Replay()
28-
],
26+
integrations: [new Sentry.Replay()],
2927
});
3028
```

src/wizard/javascript/replay-onboarding/gatsby/1.install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For the `@sentry/replay` integration to work, you must have the Sentry browser S
1111

1212
```bash
1313
# Using yarn
14-
yarn add @sentry/gatsby @sentry/replay
14+
yarn add @sentry/gatsby
1515

1616
# Using npm
17-
npm install --save @sentry/gatsby @sentry/replay
17+
npm install --save @sentry/gatsby
1818
```

src/wizard/javascript/replay-onboarding/gatsby/2.configure.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ module.exports = {
1717
{
1818
resolve: "@sentry/gatsby",
1919
},
20-
]
20+
],
2121
};
2222
```
2323

2424
Configure your `Sentry.init`:
2525

2626
```javascript {filename:sentry.config.js}
2727
import * as Sentry from "@sentry/gatsby";
28-
import { Replay } from "@sentry/replay";
2928

3029
Sentry.init({
3130
dsn: "___PUBLIC_DSN___",
@@ -37,9 +36,7 @@ Sentry.init({
3736
// sessions when an error occurs.
3837
replaysOnErrorSampleRate: 1.0,
3938

40-
integrations: [
41-
new Replay()
42-
],
39+
integrations: [new Sentry.Replay()],
4340
});
4441
```
4542

src/wizard/javascript/replay-onboarding/javascript/1.install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For the `@sentry/replay` integration to work, you must have the Sentry browser S
1111

1212
```bash
1313
# Using yarn
14-
yarn add @sentry/browser @sentry/replay
14+
yarn add @sentry/browser
1515

1616
# Using npm
17-
npm install --save @sentry/browser @sentry/replay
17+
npm install --save @sentry/browser
1818
```

src/wizard/javascript/replay-onboarding/javascript/2.configure.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,17 @@ Add the following to your SDK config. There are several privacy and sampling opt
1111

1212
```javascript
1313
import * as Sentry from "@sentry/browser";
14-
import { Replay } from "@sentry/replay";
1514

1615
Sentry.init({
1716
dsn: "https://[email protected]/0",
18-
17+
1918
// This sets the sample rate to be 10%. You may want this to be 100% while
2019
// in development and sample at a lower rate in production
2120
replaysSessionSampleRate: 0.1,
2221
// If the entire session is not sampled, use the below sample rate to sample
2322
// sessions when an error occurs.
2423
replaysOnErrorSampleRate: 1.0,
2524

26-
integrations: [
27-
new Replay()
28-
],
25+
integrations: [new Sentry.Replay()],
2926
});
3027
```

src/wizard/javascript/replay-onboarding/nextjs/1.install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For the `@sentry/replay` integration to work, you must have the Sentry browser S
1111

1212
```bash
1313
# Using yarn
14-
yarn add @sentry/nextjs @sentry/replay
14+
yarn add @sentry/nextjs
1515

1616
# Using npm
17-
npm install --save @sentry/nextjs @sentry/replay
17+
npm install --save @sentry/nextjs
1818
```

src/wizard/javascript/replay-onboarding/nextjs/2.configure.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Add the following to your SDK config. There are several privacy and sampling opt
1111

1212
```javascript {filename:sentry.client.config.js}
1313
import * as Sentry from "@sentry/nextjs";
14-
import { Replay } from "@sentry/replay";
1514

1615
Sentry.init({
1716
dsn: "___PUBLIC_DSN___",
@@ -23,9 +22,7 @@ Sentry.init({
2322
// sessions when an error occurs.
2423
replaysOnErrorSampleRate: 1.0,
2524

26-
integrations: [
27-
new Replay()
28-
],
25+
integrations: [new Sentry.Replay()],
2926
});
3027
```
3128

src/wizard/javascript/replay-onboarding/react/1.install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For the `@sentry/replay` integration to work, you must have the Sentry browser S
1111

1212
```bash
1313
# Using yarn
14-
yarn add @sentry/react @sentry/replay
14+
yarn add @sentry/react
1515

1616
# Using npm
17-
npm install --save @sentry/react @sentry/replay
17+
npm install --save @sentry/react
1818
```

src/wizard/javascript/replay-onboarding/react/2.configure.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Add the following to your SDK config. There are several privacy and sampling opt
1111

1212
```javascript
1313
import * as Sentry from "@sentry/react";
14-
import { Replay } from "@sentry/replay";
1514

1615
Sentry.init({
1716
dsn: "___PUBLIC_DSN___",
@@ -23,8 +22,6 @@ Sentry.init({
2322
// sessions when an error occurs.
2423
replaysOnErrorSampleRate: 1.0,
2524

26-
integrations: [
27-
new Replay()
28-
],
25+
integrations: [new Sentry.Replay()],
2926
});
3027
```

src/wizard/javascript/replay-onboarding/remix/1.install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For the `@sentry/replay` integration to work, you must have the Sentry browser S
1111

1212
```bash
1313
# Using yarn
14-
yarn add @sentry/remix @sentry/replay
14+
yarn add @sentry/remix
1515

1616
# Using npm
17-
npm install --save @sentry/remix @sentry/replay
17+
npm install --save @sentry/remix
1818
```

src/wizard/javascript/replay-onboarding/remix/2.configure.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Add the following to your SDK config. There are several privacy and sampling opt
1111

1212
```javascript {filename: entry.client.tsx}
1313
import * as Sentry from "@sentry/remix";
14-
import { Replay } from "@sentry/replay";
1514

1615
Sentry.init({
1716
dsn: "___PUBLIC_DSN___",
@@ -23,9 +22,7 @@ Sentry.init({
2322
// sessions when an error occurs.
2423
replaysOnErrorSampleRate: 1.0,
2524

26-
integrations: [
27-
new Replay()
28-
],
25+
integrations: [new Sentry.Replay()],
2926
});
3027
```
3128

src/wizard/javascript/replay-onboarding/svelte/1.install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For the `@sentry/replay` integration to work, you must have the Sentry browser S
1111

1212
```bash
1313
# Using yarn
14-
yarn add @sentry/svelte @sentry/replay
14+
yarn add @sentry/svelte
1515

1616
# Using npm
17-
npm install --save @sentry/svelte @sentry/replay
17+
npm install --save @sentry/svelte
1818
```

src/wizard/javascript/replay-onboarding/svelte/2.configure.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import "./app.css";
1414
import App from "./App.svelte";
1515

1616
import * as Sentry from "@sentry/svelte";
17-
import { Replay } from "@sentry/replay";
1817

1918
Sentry.init({
2019
dsn: "___PUBLIC_DSN___",
@@ -26,9 +25,7 @@ Sentry.init({
2625
// sessions when an error occurs.
2726
replaysOnErrorSampleRate: 1.0,
2827

29-
integrations: [
30-
new Replay()
31-
],
28+
integrations: [new Sentry.Replay()],
3229
});
3330

3431
const app = new App({

src/wizard/javascript/replay-onboarding/vue/1.install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For the `@sentry/replay` integration to work, you must have the Sentry browser S
1111

1212
```bash
1313
# Using yarn
14-
yarn add @sentry/vue @sentry/replay
14+
yarn add @sentry/vue
1515

1616
# Using npm
17-
npm install --save @sentry/vue @sentry/replay
17+
npm install --save @sentry/vue
1818
```

src/wizard/javascript/replay-onboarding/vue/2.configure.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Add the following to your SDK config. There are several privacy and sampling opt
1515
import Vue from "vue";
1616
import Router from "vue-router";
1717
import * as Sentry from "@sentry/vue";
18-
import { Replay } from "@sentry/replay";
1918

2019
Vue.use(Router);
2120

@@ -34,9 +33,7 @@ Sentry.init({
3433
// sessions when an error occurs.
3534
replaysOnErrorSampleRate: 1.0,
3635

37-
integrations: [
38-
new Replay()
39-
],
36+
integrations: [new Sentry.Replay()],
4037
});
4138

4239
// ...
@@ -73,9 +70,7 @@ Sentry.init({
7370
// sessions when an error occurs.
7471
replaysOnErrorSampleRate: 1.0,
7572

76-
integrations: [
77-
new Replay()
78-
],
73+
integrations: [new Replay()],
7974
});
8075

8176
app.use(router);

0 commit comments

Comments
 (0)