From abb4f4b5d1f47bc865c8415ee29e8a49ba4cf6a8 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 17 Jan 2023 13:07:21 +0100 Subject: [PATCH 1/5] feat(replay): Update replay CDN usage docs --- .../session-replay/install/javascript.mdx | 14 +------ .../javascript/common/install/cdn.mdx | 42 ++++++++++++------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/platform-includes/session-replay/install/javascript.mdx b/src/platform-includes/session-replay/install/javascript.mdx index 83bbe97da0f30..cce2f5b312ddf 100644 --- a/src/platform-includes/session-replay/install/javascript.mdx +++ b/src/platform-includes/session-replay/install/javascript.mdx @@ -11,20 +11,10 @@ yarn add @sentry/browser ``` ```html {tabTitle: CDN} - - - ``` diff --git a/src/platforms/javascript/common/install/cdn.mdx b/src/platforms/javascript/common/install/cdn.mdx index f891b588bda74..b20935489cb50 100644 --- a/src/platforms/javascript/common/install/cdn.mdx +++ b/src/platforms/javascript/common/install/cdn.mdx @@ -8,38 +8,43 @@ import JsBundleList from "~src/components/jsBundleList"; 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. +## Performance Bundle + +To use Sentry for error monitoring and performance tracing, you can use the following bundle: + ```html {tabTitle: CDN} ``` - +## Performance & Replay Bundle -Version 7 of the Sentry JavaScript SDKs changed the bundles to be ES6 by default. -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). +To use Sentry for error monitoring, performance tracing, and Replay, you can use the following bundle: - +```html {tabTitle: CDN} + +``` -## Performance Bundle +## Errors-only Bundle -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. +If you only use Sentry for error monitoring, and don't need performance tracing or replay functionality, you can use the following bundle: ```html {tabTitle: CDN} ``` - - -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`. - - +## Usage & Configuration Once you've included the Sentry SDK bundle in your page, you can use Sentry in your own bundle: @@ -72,6 +77,13 @@ For example: - `rewriteframes.es5.min.js` is the `RewriteFrames` integration, compiled to ES5 and minified, with no debug logging - `bundle.tracing.es5.debug.min.js` is `@sentry/browser` and `@sentry/tracing` bundled together, compiled to ES5 and minified, with debug logging included + + +Version 7 of the Sentry JavaScript SDKs changed the bundles to be ES6 by default. +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). + + + ## Additional Configuration From bccfbe00904844bd1d6079550bfb4ce7cb8952d8 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 17 Jan 2023 16:14:21 +0100 Subject: [PATCH 2/5] Apply suggestions from code review Co-authored-by: Lukas Stracke --- src/platforms/javascript/common/install/cdn.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/common/install/cdn.mdx b/src/platforms/javascript/common/install/cdn.mdx index b20935489cb50..f6b0ec9f627f6 100644 --- a/src/platforms/javascript/common/install/cdn.mdx +++ b/src/platforms/javascript/common/install/cdn.mdx @@ -10,7 +10,7 @@ Sentry supports loading the JavaScript SDK from a CDN. Generally we suggest usin ## Performance Bundle -To use Sentry for error monitoring and performance tracing, you can use the following bundle: +To use Sentry for error and performance monitoring, you can use the following bundle: ```html {tabTitle: CDN}