Loader Script

The Loader Script is the easiest way to initialize the Sentry SDK. The Loader Script also automatically keeps your Sentry SDK up to date and offers configuration for different Sentry features.

Using the Loader

To use the loader, go in the Sentry UI to Settings > Projects > (select

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
) > Client Keys (
DSNThe Data Source Name (DSN) key tells the Sentry SDK where to send events, ensuring they go to the right project.
)
, and then press the "Configure" button. Copy the script tag from the "JavaScript Loader" section and include it as the first script on your page. By including it first, you allow it to catch and buffer events from any subsequent scripts, while still ensuring the full SDK doesn't load until after everything else has run.

Copied
<script
  src="https://js.sentry-cdn.com/examplePublicKey.min.js"
  crossorigin="anonymous"
></script>

By default, Performance Monitoring and Session Replay are enabled.

Source Maps

To have correct stack traces for minified asset files when using the Loader Script, you will have to either host your Source Maps publicly or upload them to Sentry.

Loader Configuration

The loader has a few configuration options:

  • What version of the SDK to load
  • Using Performance Monitoring
  • Using Session Replay
  • Showing debug logs

SDK Version

To configure the version, use the dropdown in the "JavaScript Loader" settings, directly beneath the script tag you copied earlier.

JavaScript Loader Settings

Note that because of caching, it can take a few minutes for version changes made here to take effect.

Load Timing

If you only use the Loader for errors, the loader won't load the full SDK until triggered by one of the following:

  • an unhandled error
  • an unhandled promise rejection
  • a call to Sentry.captureException
  • a call to Sentry.captureMessage
  • a call to Sentry.captureEvent

Once one of those occurs, the loader will buffer that event and immediately request the full SDK from our CDN. Any events that occur between that request being made and the completion of SDK initialization will also be buffered, and all buffered events will be sent to Sentry once the SDK is fully initialized.

Alternatively, you can set the loader to request the full SDK earlier: still as part of page load, but after all of the other JavaScript on the page has run. (In other words, in a subsequent event loop.) To do this, include data-lazy="no" in your script tag.

Copied
<script
  src="https://js.sentry-cdn.com/examplePublicKey.min.js"
  crossorigin="anonymous"
  data-lazy="no"
></script>

Finally, if you want to control the timing yourself, you can call Sentry.forceLoad(). You can do this as early as immediately after the loader runs (which has the same effect as setting data-lazy="no") and as late as the first unhandled error, unhandled promise rejection, or call to Sentry.captureMessage or Sentry.captureEvent (which has the same effect as not calling it at all). Note that you can't delay loading past one of the aforementioned triggering events.

If Performance Monitoring and/or Session Replay is enabled, the SDK will immediately fetch and initialize the bundle to make sure it can capture transactions and/or replays once the page loads.

SDK Configuration

While the Loader Script will work out of the box without any configuration in your application, you can still configure the SDK according to your needs.

Default Configuration

For Performance Monitoring, the SDK will be initialized with tracesSampleRate: 1 by default. This means that the SDK will capture all traces.

For Session Replay, the defaults are replaysSessionSampleRate: 0.1 and replaysOnErrorSampleRate: 1. This means Replays will be captured for 10% of all normal sessions and for all sessions with an error.

Release Configuration

You can configure the release by adding the following to your page:

Copied
<script>
  window.SENTRY_RELEASE = {
    id: "...",
  };
</script>

Custom Configuration

The loader script always includes a call to Sentry.init with a default configuration, including your

DSNThe Data Source Name (DSN) key tells the Sentry SDK where to send events, ensuring they go to the right project.
. If you want to configure your SDK beyond that, you can configure a custom init call by defining a window.sentryOnLoad function. Whatever is defined inside of this function will always be called first, before any other SDK method is called. Be sure to define this function before you add the loader script, to ensure it can be called at the right time:

Copied
<script>
  // Configure sentryOnLoad before adding the Loader Script
  window.sentryOnLoad = function () {
    Sentry.init({
      // add custom config here
    });
  };
</script>

<script
  src="https://js.sentry-cdn.com/examplePublicKey.min.js"
  crossorigin="anonymous"
></script>

Inside of the window.sentryOnLoad function, you can configure a custom Sentry.init() call. You can configure your SDK exactly the way you would if you were using the CDN, with one difference: your Sentry.init() call doesn't need to include your DSN, since it's already been set. Inside of this function, the full Sentry SDK is guaranteed to be loaded & available.

Copied
<script>
  // Configure sentryOnLoad before adding the Loader Script
  window.sentryOnLoad = function () {
    Sentry.init({
      release: " ... ",
      environment: " ... "
    });
    Sentry.setTag(...);
    // etc.
  };
</script>

Guarding SDK Function Calls

By default, the loader will make sure you can call these functions directly on Sentry at any time, even if the SDK is not yet loaded:

  • Sentry.captureException()
  • Sentry.captureMessage()
  • Sentry.captureEvent()
  • Sentry.addBreadcrumb()
  • Sentry.configureScope()
  • Sentry.withScope()
  • Sentry.showReportDialog()

If you want to call any other method when using the Loader, you have to guard it with Sentry.onLoad(). Any callback given to onLoad() will be called either immediately (if the SDK is already loaded), or later once the SDK has been loaded:

Copied
// Guard against window.Sentry not being available, e.g. due to Ad-blockers
window.Sentry &&
  Sentry.onLoad(function () {
    // Inside of this callback,
    // we guarantee that `Sentry` is fully loaded and all APIs are available
    const client = Sentry.getCurrentHub().getClient();
    // do something custom here
  });

Limitations of error-only capturing

When using the Loader Script with just errors, the script injects the SDK asynchronously. This means that only unhandled errors and unhandled promise rejections will be caught and buffered before the SDK is fully loaded. Specifically, capturing breadcrumb data will not be available until the SDK is fully loaded and initialized. To reduce the amount of time these features are unavailable, set data-lazy="no" or call forceLoad() as described above.

If you want to understand the inner workings of the loader itself, you can read the documented source code in all its glory over at the Sentry repository.

CDN

Sentry supports loading the JavaScript SDK from a CDN. Generally we suggest using our Loader instead. If you must use a CDN, see Available Bundles below.

Default Bundle

To use Sentry for error and performance monitoring, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/7.85.0/bundle.tracing.min.js"
  integrity="sha384-emZHKc8P6EyG/q40Jjzg0idiuMbo+ZMI1DSBsr8JjHTQ4xLlF/aujsU1dim8h50U"
  crossorigin="anonymous"
></script>

Performance & Replay Bundle

To use Sentry for error and performance monitoring, as well as for Session Replay, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/7.85.0/bundle.tracing.replay.min.js"
  integrity="sha384-tzC+d6eGL5JgbUhYWq/82ZMwO3uGRA6uBUf1jeGo6rKo+CFkrMrupMUoeVT9ITrd"
  crossorigin="anonymous"
></script>

Errors & Replay Bundle

To use Sentry for error monitoring, as well as for Session Replay, but not for performance monitoring, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/7.85.0/bundle.replay.min.js"
  integrity="sha384-COVyLVcWnhEGHFdIcbgDG7Ccu5Dpj9p9pILO9Vw3iIlKLj7Z9aVxQTPsit1baJiY"
  crossorigin="anonymous"
></script>

Errors-only Bundle

If you only use Sentry for error monitoring, and don't need performance

tracingThe process of logging the events that took place during a request, often across multiple services.
or replay functionality, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/7.85.0/bundle.min.js"
  integrity="sha384-F+cRwjMKGw4hzbZVKBAz1HGRwAk2Xa6dC3lxWG+ldft2aTaNu0sYDAUdfIF18nXv"
  crossorigin="anonymous"
></script>

Usage & Configuration

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

Copied
Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  // this assumes your build process replaces `process.env.npm_package_version` with a value
  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(),
    // If you use a bundle with session replay enabled, add the SessionReplay integration
    new Sentry.Replay(),
  ],

  // 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/],
});

Available Bundles

Our CDN hosts a variety of bundles:

  • @sentry/browser with error monitoring only (named bundle.<modifiers>.js)
  • @sentry/browser with error and performance monitoring (named bundle.tracing.<modifiers>.js)
  • @sentry/browser with error and session replay (named bundle.replay.<modifiers>.js)
  • @sentry/browser with error, performance monitoring and session replay (named bundle.tracing.replay.<modifiers>.js)
  • each of the integrations in @sentry/integrations (named <integration-name>.<modifiers>.js)

Each bundle is offered in both ES6 and ES5 versions. Since v7 of the SDK, the bundles are ES6 by default. To use the ES5 bundle, add the .es5 modifier.

Each version has three bundle varieties:

  • minified (.min)
  • unminified (no .min), includes debug logging
  • minified with debug logging (.debug.min)

Bundles that include debug logging output more detailed log messages, which can be helpful for debugging problems. Make sure to enable debug to see debug messages in the console. Unminified and debug logging bundles have a greater bundle size than minified ones.

For example:

  • bundle.js is @sentry/browser, compiled to ES6 but not minified, with debug logging included (as it is for all unminified bundles)
  • 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 with performance monitoring enabled, compiled to ES5 and minified, with debug logging included
FileIntegrity Checksum
bundle.debug.min.jssha384-+wTQD6rhFZme7LpjIBCHYdbcupHBjZUsV4dFkS4MlbnwUgumgEETRfXmqu8KAmJL
bundle.es5.debug.min.jssha384-uFWrhtICXA9/3FZHz4fLZx8WBRTdiXY/vB9aw+94ZVebPwznuyyzccNEwvhG0oqI
bundle.es5.jssha384-/tCa1ynn5dxFtUFnOywN51db+jDcKucx02quf2O4F7xew9XAesafBKG99vPCL0RC
bundle.es5.min.jssha384-igpVa3+dgh1EhwSMMwBUGFDbXcOSIJeLEMDxwyNFpFZXxMW9h+bpHoy1IkINPLRL
bundle.feedback.debug.min.jssha384-je5CGSPDSEC6tPmWQjqqfe5vIndm1rvrstcznO85zbQ6TgUZIAs70qxyn5wbf2ZI
bundle.feedback.jssha384-DzbZ4Xa4XNMYCnb4USJoEY/IIEWE8QMqaexQYPcQ6H5amUR4V6ho/cIJPH9hQi1Q
bundle.feedback.min.jssha384-XeGSEnzCTMITyiGwngReoTM/TNI1Ext3wUJvt1PdOZUQ1ydE/9ZVltsQYSxeC34m
bundle.jssha384-lNX+tungYkZ2LvTCqY4MXzR8xgiR4AOe4sQxlncypeRYgXz/oHBx6FiWDzRLSgWc
bundle.min.jssha384-F+cRwjMKGw4hzbZVKBAz1HGRwAk2Xa6dC3lxWG+ldft2aTaNu0sYDAUdfIF18nXv
bundle.replay.debug.min.jssha384-M9ijwzVp7Qmphw4/I13BBzRpk6Z5wvIyO00AGbPJz4p7owQKgv7nMloln8Ifpi4X
bundle.replay.jssha384-+erNMKb50K6x+wMbQcMzPWbWJGYODA/I5pkHmP0p2YUV2gV376j1EgC+iI8mZl2n
bundle.replay.min.jssha384-COVyLVcWnhEGHFdIcbgDG7Ccu5Dpj9p9pILO9Vw3iIlKLj7Z9aVxQTPsit1baJiY
bundle.tracing.debug.min.jssha384-7V4KHMB+lUkg5uHEejeOs8fcWUbwzsqv1U3b3HjOlux6RMUMhAsteoOF93UwGnDj
bundle.tracing.es5.debug.min.jssha384-1+3qRk2sgUsm9qGa6trwu0X+IWvfOtjfircyfqqnZ4CONa0pHNsQvvBrAxy9UUBv
bundle.tracing.es5.jssha384-vmGLNrBkwlvG/riGa15/dATQzsNQh5OeG+3ryG/MWb2FyzlnZ5Abhhl4U9aFC0ru
bundle.tracing.es5.min.jssha384-UvFO4HdJ8fGDe3NXMGEglves39ihqrCHo0ugQeE/NBeWoL45Dw8qp2kex+Um+f0G
bundle.tracing.jssha384-a6zpdKKe9aBhr9kD20FAXd8v171uJ1ATGWA2973HjjzxTnbR8jvwW+MT+ELioJHe
bundle.tracing.min.jssha384-emZHKc8P6EyG/q40Jjzg0idiuMbo+ZMI1DSBsr8JjHTQ4xLlF/aujsU1dim8h50U
bundle.tracing.replay.debug.min.jssha384-o8Ull5avNv/gUwGkFpAYp3daJYDeymCGqKc5DkUr+CGbWczqaECIlUKxGQZfnxac
bundle.tracing.replay.feedback.debug.min.jssha384-e+taXU7sTuP9BnMwbsWSp94XsHoR25dYPBa2wpcJKHtLArarHcsYyV/8t1qiertN
bundle.tracing.replay.feedback.jssha384-t5nsO3lKnlp9bM8U+u962e95tnmuiQUirgRusosEG+yVoQfCVDSiKiMROPUr1iJn
bundle.tracing.replay.feedback.min.jssha384-ABDJ4S9/lPpl1WHX5pT0z5bYgbVy06bfxazxoV9bENTvVnyxPAQv+QyxwI6ou8ND
bundle.tracing.replay.jssha384-XHjctKA+Nvjtk0KgrKgXUs6o2CYYmyErAafvLwGFdE5SrHpWEyj1clhDdhEbEdCC
bundle.tracing.replay.min.jssha384-tzC+d6eGL5JgbUhYWq/82ZMwO3uGRA6uBUf1jeGo6rKo+CFkrMrupMUoeVT9ITrd
captureconsole.debug.min.jssha384-YTv0dDOQEvRWG1pLHG8e09YJrfieGfF7A9CO4fmy01hC5xBkkKLzAjhoIvMK5Mn4
captureconsole.es5.debug.min.jssha384-wv1WtjQYuGzVkVm7yixXF2Avqtna9qdT5puBTFGK14pumQBkkLLYrlDI9xKkqUkH
captureconsole.es5.jssha384-l5bqIXWwuOWITcLnfATbaVnkR3o8GoGSpPuIba+52O17G9YFQpQ8dRAWlslAROJK
captureconsole.es5.min.jssha384-4KvHZlT/Zd3zLwB5QsdXM6BIpBHxrrWLQo1T3bdPcAjZKv2ZPNtVvq7oO2Mv/3x9
captureconsole.jssha384-TW93fE9JRaOgjsxpU+2omDgZB8nYazEJeUKLBO8+vo0a0JTGC2AR9Owo1OITU7Ze
captureconsole.min.jssha384-p/lrVUi249YT1PWAbht09J87r94HrFp5go/Bb3+1ZmXqRzZOHanx5VLbYi5GQ+b/
contextlines.debug.min.jssha384-3O4E93H6B9riPovM90iMfFL5E3TJOF/1tNCYWgDOJIE3tyl2kdw/GJgkW0TXLnwj
contextlines.es5.debug.min.jssha384-YcYBgGr2cFXW1hokJmlX3Ck3WJIe1g8VQT0fzdsneiWDhsFZ8VJ6E48k33f/ma/x
contextlines.es5.jssha384-7C2kT7F7IcZFjJBBjtpzABFcw/JT/7/Loeyj0Bzoa0+mUItb1yyf3f/k86ehmQUD
contextlines.es5.min.jssha384-ZhRGyKRZKQKB529QME40BEnIAh3h/oHlwDSBTTSnMA6KVmbSxKEK0JJjyj8z3KUD
contextlines.jssha384-hspWj+zOWviZFMJ1NHCVtP/rWmNhcguCjAvPWl1jaM9V2rPQrDHEISrWSpH9Nwbq
contextlines.min.jssha384-DNGCaTq/ti0z6DvsVz2l0d2/ClNT2a4gCvG6eACsk3P2I5G3HOdu6sBkciPif4Zg
debug-build.debug.min.jssha384-ZiUlSPaiop8K9AeNIvwWTgZLOSxlkwqBpfPQK9Bi4UwE9kKz/oxsBfNYfbZk3YjJ
debug-build.es5.debug.min.jssha384-Z0d1IdtC8hez9UiNFNtqM9tlvWEGFL/I1xurHr/cJ1TSq6ma5FMHSwQQh+4hdMXx
debug-build.es5.jssha384-BdScFXNqUq3Hq55n2IcF4EEcvSFTVSkb5X6FGdlZwMbWI7vrUWPejQ+nUCm5nNmG
debug-build.es5.min.jssha384-SK6fNLe6IhMWXZZdakgQyYexnZ2i6kAFGNf0x0AqlOccBQR1ZaZDIVJdY9V8TBP6
debug-build.jssha384-E2zx0Xnwpef2V5kCskarmZ9+qRpGa0y1laHYCDyFHersLptoL5F/skHutNZJHGgx
debug-build.min.jssha384-lrlL6PCqQHZQuDgOgyMkYKTy0lPOw5yk1bslzUyzM0l2CuYjDf2t9Fl0lavRTn7t
debug.debug.min.jssha384-3ZCjyjL0mgm2vdj6Mtz4Ob33PcD+u/KhNzvorTZx0YAgBz7H82RU86kTdrIpwUTB
debug.es5.debug.min.jssha384-qGWFpszvhvdOgBYayRpYMm8NAUuceS9Tq3/Ihl6J0PAZw5tqMwJXjgc41eptudTg
debug.es5.jssha384-Ts/YY/dUH9y3npTeMebEANYSuDzITlXg3YYLulwsIXzzl7Cjaf+GqTqbb0a4MDD5
debug.es5.min.jssha384-9HBGQV/PB5EW/Ap+UtZ09JOBPNPApLnkP/9xiu9m+2/gM4JjDpe1Y3XQVly5ATUz
debug.jssha384-7Dnd4BZHv57FLh7HpBmNvfB9yAWWj/R2diciPNVumxIngkO4pL+hozA3pARoIgMm
debug.min.jssha384-4FBTRwiKtFyIKr8IPzK5Y34XUtl84TGTILeTYCUC1n9r+y8W3vGhrJcPfRLWz27Q
dedupe.debug.min.jssha384-KWdviVngk8UP8mcOqJCVg5H/hCI5I2e2rSHuQabGbUcaiQ+336Lsn+sEMw7KI3zC
dedupe.es5.debug.min.jssha384-nFBuVQ16wrzPPwY2fCgMnjZOlMi2uaQ3Au4cqtFHxyRYa/Tjw0Dy0TF9nqLuOAJt
dedupe.es5.jssha384-SIjdxmutprbukvSbWsOSuIEjmZCMh4HT4FZF+ipGzJ3SNVT5oWoYgjM5RCKTmBVj
dedupe.es5.min.jssha384-57nhxT0+IaoowpYWD0UtXv2Y/ryHKDhvUwTTeB9htAxns5y2S5JJx+FraEWEJWmv
dedupe.jssha384-9Z8lhDLGRZdLvQpsdNRHx7ll17YClO+TdjYF3Y5pTNO4fu6aUgaAnuGg7RMrf6r3
dedupe.min.jssha384-DglxJw3Pdvmx38T/3x4OBd26tNkpuXWvCTUY7Bry+ib53jZ4V5qYP7nDEMX+4NYb
extraerrordata.debug.min.jssha384-MjWfR8xL1O1nAgRdeS0IDcybP50vSU5bzp4/GdJBKCR5/0V75C8kHKXn/qMQl/xS
extraerrordata.es5.debug.min.jssha384-IwN7a+oWzuwvFcbZr9IVJ892DyF5V7GsHbqbCwH1NEZYXW3PVwQ5V4W+t8s0pc5n
extraerrordata.es5.jssha384-cFncxT+haigRPBBEMUwBwVHIr935COC0uKc8UagKUtymqYrXQmEVHY1uJH3+Akj8
extraerrordata.es5.min.jssha384-cQDNpEQQdJkpzsaGiQfKzkK1YvVNNLozMopNxW/exGL24sSTcCQOEFJeunH5yHAr
extraerrordata.jssha384-eMKo8MaTY0SjN6PkVn2eNQkA5QwBWrIP11FMcJHF1AXKcpGG3jV0tNFxUB0MHNjv
extraerrordata.min.jssha384-52twEDdEtQnQvLJVDG4X5VrNnJBb1cKa6TxJQauuc3zFKiV11roQgr3lebg8kZ0F
httpclient.debug.min.jssha384-dsjUlYfmQ/39bD/OF1PYQ0Z0BZNOP1GRATYP8G1eU9k1APbOeIkyj6C2K/dHmbkS
httpclient.es5.debug.min.jssha384-/fKBzNxMaZYkPsWsM5LAkx13VOrtPWzhhDJxzn8UeXvF8J9GlYk60KuUuPZQkgFc
httpclient.es5.jssha384-hFDdgKyz0TeWYLm9ebKw8hG+g9GW8X7MMlw2/gw32/mrwfVjrWfXfGGUdBLgYiD8
httpclient.es5.min.jssha384-jajPT8c9GAfSwBmTllYR82ENUucHawYSUo/5f68P63Ff8Gsb012PTxYa7E2/a5EX
httpclient.jssha384-Vi+eg01XqPXtdhNXT4cc5bhNUJqb+VZq5gGg7b1EBejp5wE6j2Al0DPgZdXDCmsj
httpclient.min.jssha384-7PrgXgp8lYH7T0alSUurSvRuoo7Png1mkmxvKsaMcpyxz6RLMcxdc7oP7MRqVwzm
offline.debug.min.jssha384-T7WIyt0Sa0ZrmsB9bTEW5R//PKOpfGYdU0IVcTbn4FPHX+eA6xQPUlDW5jXdxBZK
offline.es5.debug.min.jssha384-boio0QHRiZkHk+Hu2z6NgUCzZIoOOhB5DZNpWV9SZXEAsKJZILgy/ratJuVfRMLe
offline.es5.jssha384-mTpJDNKIfM5DpP8BQe9WqD/8xx+9HQLLBzUTe8TF/k0/e4/ic39dbOMAhYUgQi/k
offline.es5.min.jssha384-dYr9mug+meHElU96YUCLLaNEpWvJQL3hTxiLnRZpn+7lIbhlWmAao29HkU/sy7P7
offline.jssha384-iDcl8veQSDEAFJLYBMXHaFgyHkjTdstpQhmr2FwZoHqjmAVjpwLo5Uneny45j0Bz
offline.min.jssha384-BxtwBd+ZSC/F+ytw/p+NyDk+zh8IbZHte7Miarh+joNl/Fd8dfjinMHVH0Wu8F7g
replay.debug.min.jssha384-r5HtXdfhvG08RuUQCRa2XyWXlHW4IHORgIvLPH6pAMW4bPsgTscNOY6eSuoEg6dK
replay.jssha384-eR+/D8iAj+SHhgdbIUikieGC9DdubOPt2GpbkEoPGBwAfhr8sP5Pe09hXK/GKmKD
replay.min.jssha384-cyj1PA7XEXCV5ZMS6Ef+DoLAB4lSV3MQYjsX4ltN0zx0uJRFe+Qdv/wPuTBrxfe4
reportingobserver.debug.min.jssha384-by/aY+BWPuuCcmfurvC/0Ja6/pXH1Efwxlzn5luSynRQEUOYXcYUHAOM5A08lNFf
reportingobserver.es5.debug.min.jssha384-WLa7PkYawpQbpslC0rfBzCD5HMZWDq/BzqpHUOJ04CYVR4Cc6FPxU0EzyJnoNuSt
reportingobserver.es5.jssha384-D7RsyKBNTiBr+zYoNw+glJq7JXlJaOkrA83axGGCHW8bnofEdIz8DpTWmfaB6Oyz
reportingobserver.es5.min.jssha384-o7XeqatLOkvRRHs+Q6KtR8mu3F6BEQf4UYxD+87Z76RnyzNWIMip06/TtUucoUxo
reportingobserver.jssha384-NfBbmakKIfYAWtCm7yYOQ7aCLZ08VTLV3eiVYSOnHvdIJLO6M5lxPZDuvc7qJCnA
reportingobserver.min.jssha384-l7LX/WXZB7L1YHI56eNL+yQPtqF7qMSFLKfuZ8YXJZCPahjfJOaMZnSoHYwDLR09
rewriteframes.debug.min.jssha384-fsxwLgMx2Fpy6k4at+CwFf3HXCPCpOXdpAKGhVIUarz8T/wjmYrr3pdxVbz8KmjB
rewriteframes.es5.debug.min.jssha384-6EgrOvQ35zmgf2GPGTYnvoMqvjO6pvqAZ/en869ShG6eMWy6g1hpXjjyn4BF8NVs
rewriteframes.es5.jssha384-+Fg1R2HJ4Q9zkG58uzYRtlaaSkBeHKSOyVF32Yn0J7odyDhWl024m3U2SCBKwMN5
rewriteframes.es5.min.jssha384-dHIPhCs5MRZ+EDglTNrW72lOqskOGq/koSPek5Jc5OAOKb4lspFP3Y6nCQCLudY+
rewriteframes.jssha384-o71HsX4nm5rbJ131Luq3FS0Kfh4EIEjJ1i5nfdYvcIa4AqWHFpK1jOsP5yTpEsvN
rewriteframes.min.jssha384-c5/4rAhyU/P1ROjEl0qMQNUv4Kmr4PqUeBNIxazyUpAHbpKxs+wLkerjCh7HvqyC
sessiontiming.debug.min.jssha384-MAi4IBGq8byzK9lduZhrvOYJ9E7mjcJq2Jx5s++KveQItLNJzyl0JGci/clnb622
sessiontiming.es5.debug.min.jssha384-izHwZldflFn9r/BrGMOIqbenvgnYCfPDirg8AL4DhbdYMjktCAOSZLkOzGD7Ql6x
sessiontiming.es5.jssha384-HYLY2puQFhvWXRdJOuJskRHDKmbR6vpXv8LAzW+/kFeklqpvu2hTtNfyeMciWsTw
sessiontiming.es5.min.jssha384-0mGWqv6pN73yY3aEPB+Ab+z6ymPL1DqiRUw1mBoSqkNMuhRe7pQMGDR/8ori5Tbt
sessiontiming.jssha384-BQCKwZL6Vt3oB1KJU+fdr/B2d1QWTysBPVq6dJb1SaSSlNptEZgO4NSrEpzUGgxr
sessiontiming.min.jssha384-WdypcNpY0MuoajWed6V3a6rPv6EZE8xisloQciYn/844KEnfomSIPFKojHJEmL4v
transaction.debug.min.jssha384-q9z93m3VoDFf7J2/Rxb98elpf7R3DSvEazxbFeXuJmBYqKysCw493tHbksWF0gPv
transaction.es5.debug.min.jssha384-/E/WZAO3dBWBKiMNx4R+0xpBQdLEI5CBDzHu/VqV2l3zZifqPCs+jSgA+DUJR5W2
transaction.es5.jssha384-KJBlD5QnG+cwtsWWHmWk9KwM6p/qMFCJVx328CNhO1bG77+qST+V7NdWZWN3cRr+
transaction.es5.min.jssha384-xJ7w9yK8AD4g0P5B69diKDjN8fP0hMxAwwC2jdPJKY6u+MX9OKUeTtVCXRrkD+1E
transaction.jssha384-hJnOm7AXfsizzE5ihQvllwF3MuVyUjzsgWLpMs0+T/IhjwDdX6v+33QMAL0dGwZG
transaction.min.jssha384-lmV5sPN/Duj3kU1bIinHBQbZVjrh4EEz+Q3JK1rBJ4xNz5+hVFaWEbId6oGx5THW

Additional Configuration

Using defer

If you use the defer script attribute, we strongly recommend that you place the script tag for the browser SDK first and mark all of your other scripts with defer (but not async). This will guarantee that that the Sentry SDK is executed before any of the others.

Without doing this you will find that it's possible for errors to occur before Sentry is loaded, which means you'll be flying blind to those issues.

Content Security Policy

If you have a Content Security Policy (CSP) set up on your site, you will need to add the script-src of wherever you're loading the SDK from, and the origin of your

DSNThe Data Source Name (DSN) key tells the Sentry SDK where to send events, ensuring they go to the right project.
. For example:

  • script-src: https://browser.sentry-cdn.com https://js.sentry-cdn.com
  • connect-src: *.sentry.io
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").