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.

To use the loader, go in the Sentry UI to Settings > Projects > (select project) > Client Keys (DSN), 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.

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.

The loader has a few configuration options:

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

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.

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.

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.

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.

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

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

The loader script always includes a call to Sentry.init with a default configuration, including your DSN. 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>

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.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.getClient();
    // do something custom here
  });

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.

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.

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

Copied
<script
  src="https://browser.sentry-cdn.com/7.112.1/bundle.tracing.min.js"
  integrity="sha384-BxOadmJSA1aS34lf/LwKiyqBljp6+GQvRsg3VHB/yCAxyCgZ01gsEC0wFij1brtH"
  crossorigin="anonymous"
></script>

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.112.1/bundle.tracing.replay.min.js"
  integrity="sha384-z4ZeGZDnGof0rV7VonXp2BmbWeBL4zYqvoOeswvhRLmuNxrcOJSpADWxnr1nZb6E"
  crossorigin="anonymous"
></script>

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.112.1/bundle.replay.min.js"
  integrity="sha384-ANeKIAL/4d2WoLYpKDxtSiNriyYHJEZpDfaRJ0EAjK20E+C8d9NDN8SvnOT5/O0O"
  crossorigin="anonymous"
></script>

If you only use Sentry for error monitoring, and don't need performance tracing or replay functionality, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/7.112.1/bundle.min.js"
  integrity="sha384-O+nzAYRN2dQTw7Y+v9eP2JqiuBAnHNBSoc9ABMFpMjfj0NLE+ezz6/EtWMZxU/p9"
  crossorigin="anonymous"
></script>

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
    Sentry.browserTracingIntegration(),
    // If you use a bundle with session replay enabled, add the Replay integration
    Sentry.replayIntegration(),
  ],

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

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-54YCB8aEx4FQhEYyoP/1CpdTOsOE8p8Z8UKBougF2CAYgJIDSTZPWvtkkNkOftJj
bundle.es5.debug.min.jssha384-WAxkskiEkY3tO9c6P4qEUuXoz8NT3FCcRtPHqCxIOP7/6FpfYMaudg979zeTexLF
bundle.es5.jssha384-cC8Se1ArLRbfuZaOlIqj/iMQncrtCshUgIiw4k+StUt/3r/NqVd+vo7IaJW0Dd4L
bundle.es5.min.jssha384-e59OVa9qht5cANz5Fo2eUAqS7NuH5zrSvmYBz7YWgn3jaaL816u041O9HswlXZig
bundle.feedback.debug.min.jssha384-LUWTbkrVZ0SJhc2swANfqr8XhpwVZlCv6gUj7q1K1Z//J9/KPjSqnavulVux+Crj
bundle.feedback.jssha384-qxPnlxrkJVFfTpbxwAzCIGe3J68IqAe/uNy5YjjSBTKD0WjHREK8fsrcZGdrDwye
bundle.feedback.min.jssha384-JnW0tzskAnj0b3LEEcnkh/7tU2kxvxPDQpC1ZTkutz60Me0T8km/0rcxYZazaEsP
bundle.jssha384-slgV6joWsR9iI9SGSW4KhnVxfiRyAjUCu6TNWCvsH9qm+TGpO18JXBhCJqovw0sa
bundle.min.jssha384-O+nzAYRN2dQTw7Y+v9eP2JqiuBAnHNBSoc9ABMFpMjfj0NLE+ezz6/EtWMZxU/p9
bundle.replay.debug.min.jssha384-kuqKYNniYbq6E8zikWQrrYhIi1Z2CW1LEmubzEmzi4TiEMKeW4LydbOjcsyajPVs
bundle.replay.jssha384-bkAYKo6/F6AhcV24Qsf/LsNFvM9q2oAJf5ORofvKHTunQUwKByryfkGCQ5YRGTSa
bundle.replay.min.jssha384-ANeKIAL/4d2WoLYpKDxtSiNriyYHJEZpDfaRJ0EAjK20E+C8d9NDN8SvnOT5/O0O
bundle.tracing.debug.min.jssha384-uFItz2Bqg0/SKPSrTS4kROVe6tMUd6J+AkP81LU7pOkwdnNpA1KL3+bcGJpqnlgX
bundle.tracing.es5.debug.min.jssha384-GSkp6iE0J1loUj6jeZJP+lcaWKm9qARW7y8oYf87w5KByCG/OjmY+uInX4RBqWXQ
bundle.tracing.es5.jssha384-SucPGGM71CmKX6e8moBkQpkFHdTT837JgqDtl4SUOmbPlqbG+dCDWyCfPIp9JPGK
bundle.tracing.es5.min.jssha384-eXSO1FYbznwvGchTpRaKR1vBiaiV1Ub5EswI7KjFW1CN4Lv50Fw/sXcwUrshmCl2
bundle.tracing.jssha384-a9n2XWLrfOkrENeEVjHVkJ6plbNLJBiqoZH9zpq5SC0SGmQn7fD6SCfjzsnx5yym
bundle.tracing.min.jssha384-BxOadmJSA1aS34lf/LwKiyqBljp6+GQvRsg3VHB/yCAxyCgZ01gsEC0wFij1brtH
bundle.tracing.replay.debug.min.jssha384-fn0jsjFFBr6OLpovWQug+nRkcYw1Iam2Z5ZZijVN+7cG4D/8mazhIKgcZOZJiitP
bundle.tracing.replay.feedback.debug.min.jssha384-Zzq+/LIsPpXE0YnEJF793i2aQko1a8fQyzKkz78vWa5MgWmgSKGRqJoRRwzVsDEo
bundle.tracing.replay.feedback.jssha384-DwLJuX9UcTdw4bQZp6+rvTpNojyFN9wlhaJIHVlXhlL2scktuhS+78XQ+qSh7nTL
bundle.tracing.replay.feedback.min.jssha384-MVg62ETpDguyyv7fpqWHeT8uUghhNkJYTbMbCQhds/SaS8MjekWVRdUYXv0SnrcX
bundle.tracing.replay.jssha384-dRLUflArqRdCVKd8jT/qga3FQWLdPFT2vSAcRRzQI0wTX7YZEwzSuiAxLgjCgzWg
bundle.tracing.replay.min.jssha384-z4ZeGZDnGof0rV7VonXp2BmbWeBL4zYqvoOeswvhRLmuNxrcOJSpADWxnr1nZb6E
captureconsole.debug.min.jssha384-TYiakxtqa2NM1mgjLzoSchIqAf2UKDM1XcKgn5GJtQe+01UUb5lre0cEo7lmx6G+
captureconsole.es5.debug.min.jssha384-Yb1VLJtAs1v/lAj4/Ir4auIN4ot8gauRnpEY4yvdXZhJ3goYu9k9wj0uQWLU76am
captureconsole.es5.jssha384-brkJqG6OVaeObz+51uUluOrueeILZX5sXLXK0cp95xlq/BhihOEFTNdW9EnxaDXJ
captureconsole.es5.min.jssha384-dn/qcdfqnOX4gM7GwnZsMoNbl4EHZzoW+oJFXCU5VDy2Y562nuhfpnfbc/HwpJi8
captureconsole.jssha384-L5+dyo3Tk5MpgmuRN9aoznZM3+CcXCJ7a2SdeXjqXObeLFGy+hUCjZdI2sGqENjP
captureconsole.min.jssha384-iW522/Rwc5tazB41BgmWL1OoDSgFJyttVBTu9NbErUR4yRpdMpNAdxSVEJSRtyrv
contextlines.debug.min.jssha384-idvTr2M/GfyFa5KFdGQCMRNRDS7XJUBwIMwLswz7EjWWEXUX13lu1emZSfVW0L5S
contextlines.es5.debug.min.jssha384-VQNiz90UMW/kTNSjOAC9h+t+JpsUs7F3dazNSyq0Gdg3PFyc3VphNdGTagwcJuDw
contextlines.es5.jssha384-ZArmLcPJQ6y7DfAGCSmlnFejX+y6285H/dJ6/+GUBrx6fnGptNNKVF+LKehKUAfz
contextlines.es5.min.jssha384-sg046KOzLDrURKq96lig40m5mWF9971stM7qDhalT9FJoC1a1s5bLcixfmAiC0mp
contextlines.jssha384-egAMvSfvwBM57qsIPP71i7NrfSMVRAv/Txey9nQKWElxf5Z0gj+Ts5xc8JSdcEoq
contextlines.min.jssha384-lLCQhkEnn/MkdqOL4JCqGIQg3WlHnbMg26zTBHGmEXtqwaMd2SBW4sg5CTrRm4QQ
debug-build.debug.min.jssha384-v3TM4rZicw6uAmwZV/plKhfcCuAggdLJKEgAVP5EWOwnDovtbAIZx85t+zgzYiE0
debug-build.es5.debug.min.jssha384-UgjMPqFU87mnwFtoGFSXofLWKg7Xt4EjO5DjYti+4aWD9OaVUTDKzFwGTKKtSWqb
debug-build.es5.jssha384-yIxx0cwPChmLkWeMfOLOnq6H5My3SdGB4wEtkyNI2Vr+jfuaYlJbPZKdCIsvM6Hf
debug-build.es5.min.jssha384-QYccb+52GojwJn6iMp1VQ9QiktPDypb9RkJarjHXqhBQ51DYPYigCyWMSSLAzSoa
debug-build.jssha384-ViMwBza06nXI9WGmsXEk9PjfGrRW0WiUKbnXMGaO1S4/TLNlODrosNKVz3TSA4JH
debug-build.min.jssha384-t2IgiGQHFIyZlOUzmMT2qSPdfzXGsBgnAMwrwRuP7t/PolZWz9VmGyHIJPKSQHit
debug.debug.min.jssha384-W78S1T+DJmIC3oS3h+TQg6qYG9r1MOGu7jXKFB7WPFv9pVNucoBiZnqUFUhmv0vY
debug.es5.debug.min.jssha384-rfk7/k/Jwr4yMETBXEYS3yu+9V2A43S9dop5W8GibTdUI2aJR1VHXsnIZwSjHKCV
debug.es5.jssha384-/TQTYbME3R9tCi3HSWGAdcmF87vkPziVwfJEimsxJ13tMkxGE/qXBAFPZG9r3nq0
debug.es5.min.jssha384-04hGv/lITJfb8NgnmLQBeroK0zmxENJ6BLP7nIdiT5Y0chuTzhncNZrytDei0FUm
debug.jssha384-C0TxzpXLisMvkOF//hiYKlURQiXMxUxQiPiF7uH8Beav9F4xZ2gcnA320hU2HKrb
debug.min.jssha384-rKVuur48Uklj4dBU+Lkd4fTZ6HiAnfgcaXtM2o/40w/QMALIBx2j/5xHWKWvn1bh
dedupe.debug.min.jssha384-BSC0vgH29bxNEpxl38ySUQRZ9LTjf+i9tqM1ntJncJ7bfsuZw81mncO8oJAjxBav
dedupe.es5.debug.min.jssha384-GGYbHAu67fgQaukvggkA9kF+RU4+uEvgk4Vb7h98BpzpMhH51Ztztet7XZy2IIKp
dedupe.es5.jssha384-x9aM8kTKjVA9b6R0279XHvgqDTNJydFP09pyRRUDbcLyXNqBa0nBbRqjfgqr5fVQ
dedupe.es5.min.jssha384-8FejK8rnMr70toyGn26o6UzVoIU5sZog4QNs+Yv2xmshIh7Q/5djB2aJN2lkVfDv
dedupe.jssha384-wAq/Rju3anKL3IECEBtvN2JWGUkuvo/o2tDfotUX4GLcGOoVfv065EqEvlro1AI0
dedupe.min.jssha384-7G0Jcr3TXp7kVl/9fKPF8W2LUeld+zjqxk4QaK7yZYYIo3BnxQOlTTy+duatdX9q
extraerrordata.debug.min.jssha384-IF6reJJsC0ygR8OS2iqg92mxX8BAk0eJOYchu6d0BD01XPTMSZWfq6XGlhLL9chv
extraerrordata.es5.debug.min.jssha384-CLb6C3L5uf5hqEkIwCDEwCSdZCvBmE0N1i131IsdxH9ipK5SwyUMvYn6gzetd5pI
extraerrordata.es5.jssha384-/AshFtSRX5A1xs7FUIteHY5vWlKfuR4Zwhd8lUXGbVPN+dRLv51IsiZlcAgOzSca
extraerrordata.es5.min.jssha384-EjYu0AhqYcw6L73TGwkir87yKWgwHWtYE+7rY0UilIdeht3ATEiRWjUlfL/gEimx
extraerrordata.jssha384-yVNoCBpgLdLN+oFnMuxDkQ9jbojxyyebWgo1YSi8MJ4mAFUO5/pIqnvIcqMv6J+c
extraerrordata.min.jssha384-DbPznhu4rdkRhoMsYozfcNDqZX0t+QGmEts82PlsNxkzeFUgPT2myNTRTDXABqt5
httpclient.debug.min.jssha384-Va2CPzFd0nqq1WTXklqwiHJ3DDjmy+Q9jbZQGX5Gx6YMO8eCeaGl4bU9S6sHBdsm
httpclient.es5.debug.min.jssha384-vHVm8n3CUEokzBan61VkNG5jPWg2VwSXM3iKP1R3FEsgpUFbWXcMPt9GiOjhp4V+
httpclient.es5.jssha384-9EN5T0n84+gfO7tcu1FzZDQYp7k1Yiv+hOKh3Z/zu2fCHzA0ekPWl8tWaLs3jeMl
httpclient.es5.min.jssha384-J+BK5E+8zNk8d9bFEomgUlHjirP7vz9pF7KteDDq/8EXh0NipJm16GjJFSXY+7cG
httpclient.jssha384-TvO4T5N9pXgOAO8+rbICnGbieSkTEiPCmCl9R6wVqF6FFU+Z5zML8/ewM1YxiOoL
httpclient.min.jssha384-3LLmD5IjCT/wq+AIZGhB2jIKgzvgP6WbBTCnDFaL9rvk6UQvSm2oJK7RpNXGY1na
offline.debug.min.jssha384-sO6OOHOrNzivavHIhaUcAJqih6pBZEJ7s2xJ5qiPcwJXA4r95TLO1Ay9avJLvJhX
offline.es5.debug.min.jssha384-I5GG9U3jcqB/6+fAgEH9ObolsEO9/h60f7L5uKlYMCB71e94lVvfIROZ8VepldP+
offline.es5.jssha384-/YpoZ8VkuoextXg7zpNGpT9egsTZro2LkBQzjjx/8/UK/YuljP0l/5CxhvXxDqsR
offline.es5.min.jssha384-KHw28ouuAaMPw51bNZ0yBNl4hVV9fxitbEuvC+e6d0XyxjsQ12AFv1097exTMXhd
offline.jssha384-btqoMPfZs8adRQCKwMJHD1lmph7z+D+ztAzbcpcrZyira7dbCjN3F6h591e3Prlr
offline.min.jssha384-dnb8KW5QXgxmJY9eAkJw5O74DhcHFn4HZE36plMbuUTAkjQn9JVOowUd2/Arwljl
replay-canvas.debug.min.jssha384-4EQAu4d+DJivPvwW9WT10fyEJPZmbjtxjrfHtCNvXjWFIcMDVDUAxzIkCOoA6Thi
replay-canvas.jssha384-zaQGTRhgdD2nDfQDGdM4jh845dqvbkTnp2fJCTnJe1ohAJMiwbX6CfckoqdIVtEs
replay-canvas.min.jssha384-uVFfclVIBp9ymEOiqrYKtPSgj25FgkgbohmhMZf2lHe+1upLQiruvcW1FZci227P
replay.debug.min.jssha384-vHiFaF+Kh2ClQnlPZ0TgH9M/3Rjl9RruqF9XFHbamnLBfaOJKbE+SS5WPPGoDUnV
replay.jssha384-A/v5RdZNMfG6i924+oE9KRQY+K6sRHZCXX5BVlnDU58gxBsVbLEbQ7lqK+N0xsmG
replay.min.jssha384-vB8ZGFhbnypwC7BcTuE71iJ23PK7MJbyvsrSHs8dyJsDsS1RtDcLYrBOiaEeiQm4
reportingobserver.debug.min.jssha384-+HMspZlaZoxmkK3bzlTtHDOrkV/IAjauNloWNMDEkvbkd9IDduKm2aIiVmzNpB8+
reportingobserver.es5.debug.min.jssha384-xioZQuxEN+h2IW4sgR/OkIkMb7Yd7bMCcGt8xj7/j34+oBmm43oM8gNV6SmUk7i3
reportingobserver.es5.jssha384-2t554ZSUXW/orvCTOK0OrNSOILoSVKReqfS0U+vYbmwEbdObTa8WlTNtz1WFHJA4
reportingobserver.es5.min.jssha384-rcZ2KkTkQzD7ubxH0zgUkJTNd+th9nxRq5L3kLu32XVdHDC30L0RyGbE1ax8nI40
reportingobserver.jssha384-M/Lx286q2hHOerxgO61AfkznD3e3HxitVcdqC/byp7aQzMhet+v9/GSTdKrx9qoh
reportingobserver.min.jssha384-UHjO0XxyzW4KdWe2bpIutJkxUpAo1KwstYRnynOwFvwg88M1M65dxcR00AEnls9l
rewriteframes.debug.min.jssha384-B+TFPfTITDIO9e/AVA3UdAltgNHNaKK5p4RTUs4i9LqqthCRoW5RMwMvIgRQyvHL
rewriteframes.es5.debug.min.jssha384-okb+eNdiSYkTOo7Y5zalwl/LepaTWunhsEajwgt+ZYq45rlO4e4U5yah1Wy+rL4A
rewriteframes.es5.jssha384-ZnSKipJ1I9rGBoxV9P/fFdc56IZ7NpiUA4oAqJeVt7kuiFtoZRbIZMuIuDAhPxYn
rewriteframes.es5.min.jssha384-4vi/Fex55/Y6j21cUfO1O8+bvZfOEqdO+1rjdSvCx8Iti4kyC06M2qkF0JRGh3MZ
rewriteframes.jssha384-mm4KW5ldPG1gensi5ObsyP6lVj+Ktxa3R9mcjQxqS7H8CUnHOwERRbGYQFgUcu+t
rewriteframes.min.jssha384-xitqylGEUyjDYSI/yuR7LOEQ61HuGbAogOZMSicd8TtMDTcF/JKyYlAOH1OCaIAv
sessiontiming.debug.min.jssha384-GfutB/he+BhzxoGAjX07m46NnOiV+6b88CZnYaP8EsqtVHWqbr7CO+qr5RnnLqbS
sessiontiming.es5.debug.min.jssha384-PoxaZN7GpMGpzObMjc+gmJNS7AAwcsMn8A1+HbhhdG0wXyFtDGNXOVCmiMSKghE5
sessiontiming.es5.jssha384-MN9s/de8ZQz/GgANw0X6wV19r2Eg6Xqroqdktcc7cg90FT3oA2DySopG3a5WGcku
sessiontiming.es5.min.jssha384-IB+m7vPqgGRbHRisqxB0U8osQFsJoLW68JyUwIYvGK18HQSo6ZGbUihSlHI+bDrn
sessiontiming.jssha384-m4XMyVz/sMutlLuJTBELXzHOx5Nn4yV0kW4a1k1IDh+GwygvmrD91yXvKqBzyiq8
sessiontiming.min.jssha384-/F6lHwj22vKZw4tPrvve+VlKt5gKBNahwzQrRfP4WCK4ge9uUNB4/Z1Jctl7P7uC
transaction.debug.min.jssha384-3dBqcywxAF7hWHmeX6vYjDMGNO/zPyOziGTniopCNJOxRFnATqbVgVbsQUBE4qzK
transaction.es5.debug.min.jssha384-Fe5KaY/MGE8HCWiiQW3ZBjACMTV5deSJbEtz8VH24mt1oBPp3fVwJOWIHhtlC7ta
transaction.es5.jssha384-w9MCchUnJ7+WrHUX3HofA0UGJA5tNUg9bZklhNuTZWMMq9Cf65kaHcmebz/oBGyS
transaction.es5.min.jssha384-skURTtcco+by26DexwPBdNiA4LQPLqqEsPA3SXMcu/XmgMXXsUsF0pO+ZDXFAiK7
transaction.jssha384-kGKbzKjkgTcV7YgjX5Y/TdjSSR6cOKpjODP2oqczvrDu6tlQLwza4mE1PSryd1Ze
transaction.min.jssha384-vBBF9Qwx4J3fsKNKxW22MR5cPDYpzzR+f/jcFJp8jwYjpVIbF0YR4BIKmvf2Zgsi

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.

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 DSN. 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!) or suggesting an update ("yeah, this would be better").