Skip to content

Commit c48600e

Browse files
authored
feat(replay): Update replay CDN usage docs (#6088)
1 parent 65b893a commit c48600e

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,10 @@ yarn add @sentry/browser
1111
```
1212

1313
```html {tabTitle: CDN}
14-
<!--
15-
Note that the Replay bundle only contains the Replay integration and not the
16-
entire Sentry SDK. You have to add it in addition to the Sentry Browser SDK bundle:
17-
-->
18-
1914
<script
20-
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.tracing.min.js"
21-
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.min.js', 'sha384-base64') }}"
15+
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.tracing.replay.min.js"
16+
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.tracing.replay.min.js', 'sha384-base64') }}"
2217
crossorigin="anonymous"
2318
></script>
2419

25-
<script
26-
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/replay.min.js"
27-
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'replay.min.js', 'sha384-base64') }}"
28-
crossorigin="anonymous"
29-
></script>
3020
```

src/platforms/javascript/common/install/cdn.mdx

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,43 @@ import JsBundleList from "~src/components/jsBundleList";
88

99
Sentry supports loading the JavaScript SDK from a CDN. Generally we suggest using our npm package (`@sentry/browser`) instead, as using the CDN can create scenarios where Sentry is unable to load due to networking issues or common extensions like ad blockers. If you _must_ use a CDN, take a look at [loading Sentry lazily with our JS loader](../lazy-load-sentry/), which provides a deferred version of our minified ES5 browser bundle. To see what other bundles are available, see [Available Bundles](#available-bundles) below.
1010

11+
## Default Bundle
12+
13+
To use Sentry for error and performance monitoring, you can use the following bundle:
14+
1115
```html {tabTitle: CDN}
1216
<script
13-
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.min.js"
14-
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.min.js', 'sha384-base64') }}"
17+
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.tracing.min.js"
18+
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.tracing.min.js', 'sha384-base64') }}"
1519
crossorigin="anonymous"
1620
></script>
1721
```
1822

19-
<Alert level="info" title="Updates to naming scheme in SDK version 7">
23+
## Performance & Replay Bundle
2024

21-
Version 7 of the Sentry JavaScript SDKs changed the bundles to be ES6 by default.
22-
Previously, the default bundles were compiled to ES5. If you need to support ES5, see [Available Bundles](#available-bundles) or the [Migration Guide to Version 7](https://github.com/getsentry/sentry-javascript/blob/master/MIGRATION.md#upgrading-from-6x-to-7x).
25+
To use Sentry for error and performance monitoring, as well as for [Session Replay](../../session-replay), you can use the following bundle:
2326

24-
</Alert>
27+
```html {tabTitle: CDN}
28+
<script
29+
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.tracing.replay.min.js"
30+
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.tracing.replay.min.js', 'sha384-base64') }}"
31+
crossorigin="anonymous"
32+
></script>
33+
```
2534

26-
## Performance Bundle
35+
## Errors-only Bundle
2736

28-
To use Sentry's performance tracing, an alternative bundle is needed. This allows us to keep the filesize down for users who only need error monitoring.
37+
If you only use Sentry for error monitoring, and don't need performance tracing or replay functionality, you can use the following bundle:
2938

3039
```html {tabTitle: CDN}
3140
<script
32-
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.tracing.min.js"
33-
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.tracing.min.js', 'sha384-base64') }}"
41+
src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.min.js"
42+
integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.min.js', 'sha384-base64') }}"
3443
crossorigin="anonymous"
3544
></script>
3645
```
3746

38-
<Note>
39-
40-
You only need to load `bundle.tracing.min.js`, which provides both error and performance monitoring. There is also an ES5 version of the tracing bundle, `bundle.tracing.es5.min.js`.
41-
42-
</Note>
47+
## Usage & Configuration
4348

4449
Once you've included the Sentry SDK bundle in your page, you can use Sentry in your own bundle:
4550

@@ -72,6 +77,13 @@ For example:
7277
- `rewriteframes.es5.min.js` is the `RewriteFrames` integration, compiled to ES5 and minified, with no debug logging
7378
- `bundle.tracing.es5.debug.min.js` is `@sentry/browser` and `@sentry/tracing` bundled together, compiled to ES5 and minified, with debug logging included
7479

80+
<Alert level="info" title="Updates to naming scheme in SDK version 7">
81+
82+
Version 7 of the Sentry JavaScript SDKs changed the bundles to be ES6 by default.
83+
Previously, the default bundles were compiled to ES5. If you need to support ES5, see [Available Bundles](#available-bundles) or the [Migration Guide to Version 7](https://github.com/getsentry/sentry-javascript/blob/master/MIGRATION.md#upgrading-from-6x-to-7x).
84+
85+
</Alert>
86+
7587
<JsBundleList />
7688

7789
## Additional Configuration

0 commit comments

Comments
 (0)