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 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.

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 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>

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.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
  });

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.100.1/bundle.tracing.min.js"
  integrity="sha384-qDHTQsvbyIJZnxDsxk/o7/rgkA/DS8Rjg+HWqi7QyCEDW0x8K2N7XT9NBXdFpivP"
  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.100.1/bundle.tracing.replay.min.js"
  integrity="sha384-j9GeIGJghsYAeWfw63ehSi1eZnKIhuSYPuNWcwW++oPsidEf8vdRsgkj0SNU4tzc"
  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.100.1/bundle.replay.min.js"
  integrity="sha384-dAmcYznXZHZjrwwgDhA/2QrNocQy+mvLGEDmVnqDMlBZbGenmWdnipAH5Zlf4VyL"
  crossorigin="anonymous"
></script>

Errors-only Bundle

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.100.1/bundle.min.js"
  integrity="sha384-bOe2DLc2iYPY/D97/OgGNVRwQCA0BV+18PnK3P4U4kVK6nMOWKhA6w/snmfYgLaD"
  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
    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/],
});

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-JeJGRVV50Et/vPscCuPrqjXqpYvIro96VY2evm940w55A8Qzd3bfhB6JuM3Tj43Y
bundle.es5.debug.min.jssha384-4THXguBqD8Kx0kPdQ6szbjySURI4mvPDTZ2WwaRz+8NS3S73AIEIAlY8MFUJ+Hi5
bundle.es5.jssha384-NEc7cGC9StgNlJsAr4bAhXoDuerFvylH0hgvC08QUCaQH9NiiVJOIrlmZ2IGBuph
bundle.es5.min.jssha384-7escHTbWpGr7rOIgUBq6Dv9ZfvimWpdwauTj2uJLgaZ0UbAtx7VaAl/ixgpTZn2B
bundle.feedback.debug.min.jssha384-mS6jRnxfk7PoW70Agyp/vJtBQvd48nPqLHUe5AKDjMbowN5WyzLzOd2IrQ7neoWx
bundle.feedback.jssha384-xon4P/j0cjvxJkI7KysHZRHQUXGqvgrP+bFlvKtj/vIi/QVNln384Fy4qv4yQiq4
bundle.feedback.min.jssha384-Il0Qgc8gQQVgLiN1RxrjsxpdRA2f5S36UwjnOmXiR+7FRZDG/U5q3tBRS7osPOGM
bundle.jssha384-aabkeNl64JKvMbQ6/g2JilNlxKKJPGM7KI4WIyt2kXMMrAk2E+3rgrAjAi9459+F
bundle.min.jssha384-bOe2DLc2iYPY/D97/OgGNVRwQCA0BV+18PnK3P4U4kVK6nMOWKhA6w/snmfYgLaD
bundle.replay.debug.min.jssha384-cTRlOXEVH1OfxKyQjoxXw+T+765U8nj+69xgM1k1MfbWn9PyRuE7bulNo7jKZi2M
bundle.replay.jssha384-oDl4ztDSgpdiCbfg0Ru09XxcnWBep6U5T/glFpmAY1fLJcW4Qu7I/0vkznmeDO9I
bundle.replay.min.jssha384-dAmcYznXZHZjrwwgDhA/2QrNocQy+mvLGEDmVnqDMlBZbGenmWdnipAH5Zlf4VyL
bundle.tracing.debug.min.jssha384-gYm0sQnIbMx6xtPkaDw7rup6Jm1XugYh6/aC30Km1AjgxfDIc4m3kQSDagdE1poe
bundle.tracing.es5.debug.min.jssha384-elQgrYpGmB4UhOKHK2TF9DcuUpa6Zih+M27EB8ByibPdrLxFZJqh/M/pVOU43jaV
bundle.tracing.es5.jssha384-pmCvJ6OqtxbhFXOAqcrHYjNpqV4h2ZEL/aUbiPeWLP8c0MzUkF/VaGvo7hfA530w
bundle.tracing.es5.min.jssha384-Kt6/RQQfqYXGe74co15rJroI5Zue/sCEl5QPZzT2l6E2/qVwStmkPMNa6iglwBZL
bundle.tracing.jssha384-tLw85eJVzYQ9PYnx4Mi3lc2qwTQI09jcxOMhviNeNZuVICBtP+TE2bn2vWhQPvL/
bundle.tracing.min.jssha384-qDHTQsvbyIJZnxDsxk/o7/rgkA/DS8Rjg+HWqi7QyCEDW0x8K2N7XT9NBXdFpivP
bundle.tracing.replay.debug.min.jssha384-B/Ttgc9PaUMD9/fknHtxlifwwuwfc0Y7ieve0pxGh2UHloEkzuW8XYmf8e4dBFah
bundle.tracing.replay.feedback.debug.min.jssha384-8hkbtDexg8FIU3sJltkCnqKTg6311BiXcmB3SMbvz/sJcleBgqnS6ojvnLB762j7
bundle.tracing.replay.feedback.jssha384-+QCsYy4O0fyB5IWJdC3FM8bOtLLx0AzLx1ojFy+7QafPCWpIwQ1QYZzVdj/5IGq3
bundle.tracing.replay.feedback.min.jssha384-PqLBr+Imli+KYpYtd2iUHJmgzsl92fHU/t76l69dCzc3bS+qi0QNSMrhQ/EegyXw
bundle.tracing.replay.jssha384-6HPbgNsP/gAFvXObo6ZFggkJS10HfbaJSQiedwFPj5SxTM4fmSaQN8hjEWtwqnQX
bundle.tracing.replay.min.jssha384-j9GeIGJghsYAeWfw63ehSi1eZnKIhuSYPuNWcwW++oPsidEf8vdRsgkj0SNU4tzc
captureconsole.debug.min.jssha384-tVT3xUBAv9L8pERm/3vb7xifmwfVlYe0HbQGUgXgI5uVCmPpNxtzRyZOh+uMkXj3
captureconsole.es5.debug.min.jssha384-jboYcurzxvd13QpAOmq59Brev+aiPZBHc1XL+cXzq3BqN7LgRQQaAaxlqT9fJOZZ
captureconsole.es5.jssha384-1Nszzu+coyeZIdwKIh9zaY0Ds6dRgdx9gVclQn0Uc+MOm/YSl/SYmXtT4vHkJhny
captureconsole.es5.min.jssha384-vPpu1Wd6RD9gJwL6tOLeJJXwhH0WqID9C4HtjQFZvGCn9p/cLcfixeg/SSHB6I1k
captureconsole.jssha384-ZT9P61zlj8gzhnBPJRIMPR+WVMAxM4ljZMRrirkUd5MYf2URba5pxTEyeAl8fv7S
captureconsole.min.jssha384-7PkSV6UX1ldUFZv+pQVK7roXVJzlT5AQRApyRj7ZmSESWIIkaTQrk15ilgkBT9h8
contextlines.debug.min.jssha384-Fk69Plj6yvhaTFTo7TYi8eivAxe4aVCFsxxbG5RKGc68rbAe6UFu1iO9Xjpkw/Dl
contextlines.es5.debug.min.jssha384-cidj3s8VEXoo91VRzA81OtKewkuvlOs6JxXAK5kfT92KvySmwq23eu3wrQ3s5EBS
contextlines.es5.jssha384-Y6K1UuqhKn3ULXzSlUaRaeEUn1zHtOdRXFuJoCV2IAq8K1ezKS6RF6WD9mrOwDGW
contextlines.es5.min.jssha384-Vjf75ijkm1Sfhw6fkKvbh+yKhv5s6r8UQZ/xx5c0J30ofMr5OtzKkmWfG7YcSWeW
contextlines.jssha384-Ewt9AiFSo2I3ljDgJ8WWRDuok8eNLlBfAq6BUmm8Gb/VLP/klBU264lgyq+UQos7
contextlines.min.jssha384-EEKttJrSgdI07smUluyaTScVVxXdCZWQBBhskaYL0YEFoXGda3f0pnHrFtWanjL9
debug-build.debug.min.jssha384-ruXvaoRtovWpFfORkDxFMVPtuj/VJXfWtGZMUoEIsev5UgWyAbFE6bm/70Khy8cP
debug-build.es5.debug.min.jssha384-Y68P40f6COLzbogGGYfQlRcFiBV+NA2iQwlEhqKMgKJaL+TBpkyO1qW+yOvUvX3g
debug-build.es5.jssha384-RF1DEo8gTdSCF2e56BEX7IgMfYuHTgs3MKyaAIrUfc4NgeHvj1tVaOc9xEGx6bsc
debug-build.es5.min.jssha384-9GR1YzDUfa0pgjj2+C2oqqxB0POEPc6Byae84P58wdtKDwYVmQyzj/9KyMyrhUz+
debug-build.jssha384-iTfMyvNQAuFeqAv0HiGnUO/+qBud0ds8sNPZ01sp3oxDB5Q42KaXYkbWYaNHDtP1
debug-build.min.jssha384-5bY+riUFjF6fQnhyNxhEyWkakV4KtK0Fi5inMqlhqW+YlIv1hL/K56jlD3A8BHwz
debug.debug.min.jssha384-i/3nS25LBq34U0LenpyTYYd4oDWi7Nh1cI/5X/gKy64T5sP5OjDbCa1h+h8Orguy
debug.es5.debug.min.jssha384-41aQZuS8qNA32dPBbI/LdCTfuXHbaYON1/qLRVqZ/d5fVZ/r3+DgAqpytQuhZA8C
debug.es5.jssha384-2boXpocht35Cng/DBMLxlE27WNGQ9wi9j0oHZEL81ms7k3QXdv0R5KF09o1AoQJk
debug.es5.min.jssha384-N4PnX+b4FbutIKFyGcF01HxhURxSjwCLyU39qKimNkX//9LTJbZthl9WswyQaZ/Z
debug.jssha384-kPDAzfZv6tfDS1VU9kzEPASA91UtHOeYJmtbrujubCBqryq6n/iizXGc7xMpM19x
debug.min.jssha384-IS8e6HtUtDNJ/jpf2pWcFqxuqlxSV+OfvB0mNYNXa/wi380Bw9rS0Ulx4d3neIaJ
dedupe.debug.min.jssha384-GpDKWbub7NVx0kuh0sGW7n7Rh8q2nUr8YsyU/MGoZvFLkOBKAUz5BRVvjZM4l+N+
dedupe.es5.debug.min.jssha384-UNeKGnjns0tFpPDecaUu5vJpU9RlNWoRTUcR0VjqHUmwJ/eF3v5+dhDwLx3Abo5g
dedupe.es5.jssha384-SW5+wrHoqQ3dJSk+vwn30tH6BSG3fxetg3MO90iiWMuBoDsiBy+UzsN0KK9myInr
dedupe.es5.min.jssha384-P6N6xr7djR758xQdqnq+gcybEyJIRr/BB4/vUkAV1anou/Iicry9A9Og3KWwj3N0
dedupe.jssha384-dh/Z0ls8Mxx/pfH/bw0xd2LclFdQRuWX8Ns0TB3w3Q0H4V+Sele74daMFoV7cqyS
dedupe.min.jssha384-PSonfrStLv1qkk+PfTtHBZy7d8v1WIBZVYm3m+f+6AMyvA2nnM51k4FqNSEXVwyZ
extraerrordata.debug.min.jssha384-hQdFdj8bSDv5zG56E00EfQow0UOXW/xg6utSxeY7qlo37S9eVA7/Ze6Bn+xtgmiX
extraerrordata.es5.debug.min.jssha384-ftPCxGj/oEsK1KwjQExg2GWwKj+oSjCPQu6+tgANFuTBr/EpXAJzzVTgoEA3IEi+
extraerrordata.es5.jssha384-tvfjpDigSWIcC3Nc/eTXkWkAf03DHpvLbWLcMRMgsaHTXcnIv6B9PbldCDyAjyWu
extraerrordata.es5.min.jssha384-FQpWiGWxGFjS5+eVq+HRgdaAN0vRYfdbOHB+8g2lJ+8aZ0NboYcnH++gUp6bLT6v
extraerrordata.jssha384-abf4qwhVncpGISMKU2nOirrC2g/OETxpJThYJUbthRFOFw/i+zQaxyWL3Akkk981
extraerrordata.min.jssha384-pxvYEbNDT2/RlezUZPesUl2K2nBGgPZGopakhZFA8otWwNr6Gdy2NTjNG7x/TvWt
httpclient.debug.min.jssha384-99s5Jx0W90+MK7VyEVOwGJcLc+OfGrQ7f3NBdjagghFhWDq6ksOPoLXyezSRJgen
httpclient.es5.debug.min.jssha384-nEHhB1CawzthfdmoSmdVRTO/UgM7NJ/pphB3Pf3I+uQaMxJ1CmfZPobZQPXmjU93
httpclient.es5.jssha384-jInONbV6xo3ExHpB6feKgAFRRP8k2fgA0yKd+JcywETgvbkV4+hXFc7WreTS59PK
httpclient.es5.min.jssha384-LEw8SUJ6GDKa6u2Y8FGF+lESM3y2YruufGrelMYjj1q+LcpeMG2JevjuUa6OkQ4+
httpclient.jssha384-Uq2SMUY4LL1Lkvwq6Q/m39bcSG4uwhcXuHO7tjJKpeBK+We3xWjBYnhLCgmj5LkB
httpclient.min.jssha384-86PgR+tDr75/Bx+x6RauBfswtuL8lfwD/jQYbCg5zk9g/WWBTTFuLfnR+5lAM8jE
offline.debug.min.jssha384-G3V4TOwXgY+7wbWBfhuxpZp6cqcF6U/LqPWx/8d1K4cmaArMJp1yy7ZvlbQJlek7
offline.es5.debug.min.jssha384-YGfS4oNsiH1hgvu39Jietrs9oOnquRYG1GCKQA7ptGmzT0Lo7Yg55jV14pNGIo0z
offline.es5.jssha384-AMBtR7W1p+/UKtgwjxYpBtVkF1qz6skFEa9hCqqx9upzzRD3plbA0hMAPetHWJSH
offline.es5.min.jssha384-Zymb5FKrukefyagUfnUgYAQ6btUSUkZjNlLJriVncFpUU32dWqftbXDGJ2ja1aKx
offline.jssha384-KPAIt5G+It0ucBKyDVxS0QMFJ1fDBETz3bGgiVfd8Rf0ScRpHt5HQIlN/1Gz34Fv
offline.min.jssha384-CLy4Xr69OhbpZzB2FrcUVoN2g+WObpS3dpgvUy2iSM4EyZc4QzTa87hgzO7JJ29t
replay-canvas.debug.min.jssha384-S6cWia04t2DG9zeIkyM734O3FQ+1+8ayAVJ/HdeQnkj+/YSVgNBn1C840JioteMs
replay-canvas.jssha384-+T5Ii7bj0/EWnpq04c74qn37EKalTS5ZWuSxaVt99Fk5Dzu0hSi681N7jg8Ws82H
replay-canvas.min.jssha384-A3GpJyB7Uz86uxIy3wLNQl2baDRNP6QzyaEadXoFRJHlv1hCnIJ2Z2MOPoiggyyY
replay.debug.min.jssha384-GGsr/hJHLot2KQ3rry72NxaanCe87VosOTyJolZv2f2Nlv76OXKsGsuPImG/HcRz
replay.jssha384-swr8Lq9AA+wm6EXDOALsVBOFlZn6N/vv4bP1i9SHRmtq+q3YPpsUt0ux8hIf9UUb
replay.min.jssha384-UTPCF84yipC7zm8BhdNfECa6bmwSVoLwn35rZ5K4clQUyIn64wLycQboAcJzSIDF
reportingobserver.debug.min.jssha384-YOZV3IHqOsUHut//ra+RFHPfV1WrdZqBRd3fxR5bnDxgIsUeGqw5n6nKX5UkrKcf
reportingobserver.es5.debug.min.jssha384-PfkQBidJAo64bCv0Q5W/sUZWb3FvqL12RAH+W9MAnjxc9EBJHcHpD0eiSahbSSho
reportingobserver.es5.jssha384-7COMIuqEYv6ex7gAsZU5LlF1jnReECHvqZykNS/IkGIql2Ev5x8s1pcOTPf9aOd1
reportingobserver.es5.min.jssha384-twQnbIqCCFpazsEFTz052Z0ws4GYukyjfKARfTYfgGaXstT6zJbC4w7qtduS4bCK
reportingobserver.jssha384-O64r1yQVOFOgEv92w/YguFPM2EeLSTOqlF25+BT/JyFAmboecVxKzfKUDRquSaaN
reportingobserver.min.jssha384-SsBV81d+m5PTRM9cLgtxYxD1++GXJbtIdt+kcQuWPZAwBlJ7m6C6jaEK5hQQCdUn
rewriteframes.debug.min.jssha384-Ht5xe1oJRIutJdgjpmUHTIeSgqFdg6iRNLrl9Gi7hsejIXLrAZ5KqhNe2COyPOtW
rewriteframes.es5.debug.min.jssha384-9du0gpVJbcMRIw8zGfWOnG3qVT3lPgKeyGb+iIof0MG55BHiFo2Nmu6HmIZR689l
rewriteframes.es5.jssha384-dcUCsb8lOPkSIzCkOTLc7KkgqmJQWzzkkHSlA1acNyclKUad7FzrB/+EhlWOtChD
rewriteframes.es5.min.jssha384-KbHEK45uZ97x9Mo1nzw91FKhHd1QmhvJIEHirta1JBtGGyLFy4rdWPlYZGSoUMED
rewriteframes.jssha384-fM5HHpjlv0H4HLyQahr//xKyvtDMKBGk6r8EKSE3urMR0ouRSfSmc4gL4tO3w83k
rewriteframes.min.jssha384-noMJoLfRSFnSH+aHTKw0GoU3C+WkdUn7ipNQDEGCdkchfZh7LSmH03G0QVfkNjKi
sessiontiming.debug.min.jssha384-OJ8TFuKt27jxO4c1mvsMkUCQQ+Y+t1Hn7PzjsYBsYtEcxvmn7bDIYyGEgpb4Jw2S
sessiontiming.es5.debug.min.jssha384-mJ0+fN0sFRyIjAZa7IMBHSosbWf0N3P3F4gChtmy753OtzuSbD8AzJVQipd9cg+/
sessiontiming.es5.jssha384-B5o4X9m7URMf8lvRXZiN9YPzi2m0IZtvjheKhh3ZKncZbhP1OHVZXKPbaiHMnEjr
sessiontiming.es5.min.jssha384-XYXWJxprZTbRvU78KbUZh4ASTwi4FcHItnAQhMwm8e11bRzqG1agtVFlLvpjS4NV
sessiontiming.jssha384-wEN2NypTZLIe5LJJMX36l45RwFgqQlC63mvdW9eutwXs4UcuMhyAUWKDOBUC668D
sessiontiming.min.jssha384-j7xmIdvQa/bnd2dpm2az+4NEqduhWacvO6zZY4Xg1QEqcOXGWNN56BzI7utrVnyi
transaction.debug.min.jssha384-NvQIBF3nIB5DbISCOMaU3SFcKZOHBwkT7cYcBLa3hXmxwa1gTfjswHXCBP/Rv/at
transaction.es5.debug.min.jssha384-1ur1mXkqfnM6lh2vjrbOXFhcnPLfMGoinmB+3GfmgOqukMXePG/V42Qn5QuafwfI
transaction.es5.jssha384-ypEN8VJ6qdO8lDNjxyxRuKgGPYEad0skC9Fpgc4AtZ6Yj7OWtKMQefSH3VttqUBr
transaction.es5.min.jssha384-DEG3nJSm+0yVxW9RPueZeAspgULrPkTCPECIr9Typ6shajLSqzloJ3YQKb91rkVn
transaction.jssha384-tuxocAgH20BJqXZbSvdvvv9aWTfF6QivNfAioHuu1wZ8XmQXuamg6a75iwIz+gBx
transaction.min.jssha384-s5gWY7iO13qfG23R224/H5anFF6RLQ1uDlApI1Bd84kmLvpIpWyOMGAgOwxDR0tx

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 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").