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.113.0/bundle.tracing.min.js"
  integrity="sha384-ZrNBTovfOhFkw7ionfLEjl5voCae1GCXOcuGJB3/ucV57gs/+RxyVRPXfFhd7jwf"
  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.113.0/bundle.tracing.replay.min.js"
  integrity="sha384-wXgzLdc+RJ2eAiFpbvC5qUGzPUApNnMOI/DBvb1hSu8Zo4J/7NkxmP4DvBmNvWbQ"
  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.113.0/bundle.replay.min.js"
  integrity="sha384-4yH7lCIYM/TaJ47pCK3ULyz98ndVRPhEl4+oyIVPF4wm+a10wEkuKDq1FxSRLSXY"
  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.113.0/bundle.min.js"
  integrity="sha384-TYVGzwhMn3879uKPh7ILdd4FzyyKNrwarNM3yQe5Ei22H2MNjLG1yEYTsgzpsxMj"
  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-/n9gAOqqpWbne1Str5TV7KyoG474dH07rAvVFGtpFt9mbtQTYI+gyY0FKHDR44Lg
bundle.es5.debug.min.jssha384-HXLbx7BYTY4vRAd2T0fikSWwBwCABwLbXFuarEJYYzkKfzet7o1kQkDR19M0EGfg
bundle.es5.jssha384-5nvnTD37+U6JKBKa+Xlr+6dkCpG20T2t/VB2AhgeEEsDEaT9aNTrzTYPjpR2k77l
bundle.es5.min.jssha384-iitvqknC6j+1/TJ8q6IRCp1acoYsdPVcQ/7+QlgvkHY6cD95EB72HidKZLqp+YXg
bundle.feedback.debug.min.jssha384-X5u5f9tXaJON4/LF4HhGmhL9zHtNubeOyGuHdZ/I+gU4/GL82VA938Hru0gKVsnv
bundle.feedback.jssha384-rCkJzeWDvpWREHUGAIPdvHVm11tqtF93+B9I3j70VJdxxnyMjr3b1UBlujiq9Evr
bundle.feedback.min.jssha384-QCEd3XW6QTxDAkUb2yixnluK2nipal274PmbdPO57MlA3sd5Q/1MpnaApDOXfCm+
bundle.jssha384-WPswFhG9Hn62plqamGIqpn2u+Hy6G7QE+V7iWqxzzgNrrYF3bztkkxn/DidhbbgV
bundle.min.jssha384-TYVGzwhMn3879uKPh7ILdd4FzyyKNrwarNM3yQe5Ei22H2MNjLG1yEYTsgzpsxMj
bundle.replay.debug.min.jssha384-hWZedNrESp5F6zNN2jxNmhAa84pUEts0BfG9tQkHLwpxwzte7G9lScn9PPi1ZJqr
bundle.replay.jssha384-3UoRgGoJ5OmILS+Cx/I1HfFZ74oHEB8cPcgK2e5u0Kz8gHgCHugnoRLeKHwouxYU
bundle.replay.min.jssha384-4yH7lCIYM/TaJ47pCK3ULyz98ndVRPhEl4+oyIVPF4wm+a10wEkuKDq1FxSRLSXY
bundle.tracing.debug.min.jssha384-hT07NQ2q6ZM5E4JRREnE/JjhGIQOtvQdsI+JzJ2I3jQ03UB/n/qIzOVBN/pVh0hr
bundle.tracing.es5.debug.min.jssha384-O0DLdz16WnRhFoAcMbP+hB77Wx4EfnLC55OdW5NHGYKeo6jnJKWuTdYVsV1Po1c8
bundle.tracing.es5.jssha384-SexBBMpjRHOd7s4ycg9lpBdx9e8o1wV085lL6FV4sq4G1PPQ7eqWVDOdJhAi6cJo
bundle.tracing.es5.min.jssha384-ELwXEhuSQWcYoU/6567N1/svav28lFMYBr2tP9Tr6bOqB8aar+fnI9QXnJPz+ekw
bundle.tracing.jssha384-fxiVQ0/bE7cGTYmuAyEYoxFFWMOUKc/rn8F8q1NqsYh8XSCZOIqux8vFPl0wHXZC
bundle.tracing.min.jssha384-ZrNBTovfOhFkw7ionfLEjl5voCae1GCXOcuGJB3/ucV57gs/+RxyVRPXfFhd7jwf
bundle.tracing.replay.debug.min.jssha384-B++QB0bnUWg7idt99iK1jtgMahyD3oOaUC6pLu6VwgyjOIeuNvESugktKbRzmphg
bundle.tracing.replay.feedback.debug.min.jssha384-FXXMWxn0Qm+jq0W7LnXKKrJ8TV51vFeG3pmgyDDkvqG/nfOiKhQ9AG0giW3DljP7
bundle.tracing.replay.feedback.jssha384-Hs22fiPiA+iAft2fxZpXCVa57OUELZaDl56FHaFk0Wj9SM0yeixCuy6of2txwh4s
bundle.tracing.replay.feedback.min.jssha384-XrzkC5iW7c7KLvtl2cXgnkxSeU70EO1LAUs4eaqwRyXFbqEAUSiUKONN6LzctuBi
bundle.tracing.replay.jssha384-a0JG1KXM+nyOZmA7KnllH3kTuZHoWwVK/qOVMgD0+PanBcMuVGYjtde8e3Awozfn
bundle.tracing.replay.min.jssha384-wXgzLdc+RJ2eAiFpbvC5qUGzPUApNnMOI/DBvb1hSu8Zo4J/7NkxmP4DvBmNvWbQ
captureconsole.debug.min.jssha384-BbzHU8H73wtSojRjkQZ935kBhK46UQ5fnXOBpZvlrwIVUx9j4z/ipOTN/6TzrhHD
captureconsole.es5.debug.min.jssha384-sVV8eep0TT5qR6d3SDlZoDoDtlKQr2T06wf1tzNK4eCBhXbMG1poDEk9RKhFOAb+
captureconsole.es5.jssha384-UdyBFO9Zu0XWSI9k54sNVG/i2iDUhQNPuwrN1Qr4kw61yqhX/O2PCQwBZmTXeHOl
captureconsole.es5.min.jssha384-kVjkJDGjIeyQUQSnX9cHUsho5dVS478DXgtET7KQs4NMy7UIGpbb7FrMZINIj6VB
captureconsole.jssha384-9d8CH55gIqw5t9/x7swHbqVcbvTT15lRpwKAJV1uz/somtvqDEtS7XhPycOPafjY
captureconsole.min.jssha384-H94VNEVI1G7X5bbKxVSFigZ//BDP5XFYQrGnxeivk1WgakI45En7H9m2DSeHmcmY
contextlines.debug.min.jssha384-6rjXoTEseSW8H7mLYC1zF4mqw0RvY36GzAPcI5ihv4tZVnriKYRaa3n/AqG4d7Ap
contextlines.es5.debug.min.jssha384-LCy6Uc7304wSwJLpEiJENuQGxc2F3PJ/xCUSL7ET1Gb8MYTqgRjTZiNxA+soI/Tk
contextlines.es5.jssha384-/wmn4YwEd1KgYhpPeL0ZXAwd5S4sSkHjuAs+iGGBH6UYJhn++sK9JqUNKA501I28
contextlines.es5.min.jssha384-MaL/kGzc4F+7PCCQ2JF/m9Q1kGgiSTn/Q6GZPp9XswAvibT5X8KBJ4sNlmODmebd
contextlines.jssha384-LBmkIjEndb0TlcGS8EKWXNVh0LJRGHU3zz2RuCvrOLT5AjLMAV6L5Ydm8GH+lqnx
contextlines.min.jssha384-PsYGdLYRy0SfqBDRMLdizC8BTR4jAE/IguCMktXRYCwe1v3NMLshmirne82PlDPg
debug-build.debug.min.jssha384-zb62e5gG/uCUQR8QCicM6JVOilTYpgLW6k2ZI+n2EeLsoNbW0Yib85+8CnoERtAp
debug-build.es5.debug.min.jssha384-mWd5inbg9+bQtb8+evEduu4PFynnltkymGxiNd+v8X1T6Ko4Rhahvxcb0lNPyL23
debug-build.es5.jssha384-ADk2fexJIVgqVOiJIGlZT155zJyGwRkiD4QW4WEaAiyyRRz3+VxP+m+UX5Wm5xco
debug-build.es5.min.jssha384-477s4wycu2ixRZ58QgyW1h3tm1A6mTvD9z6tUyn3XJunAIKuu2ROkg9Ca1UhTMmZ
debug-build.jssha384-gggtb4BvDsEHvHElZXNWC/adjwdmxGHIatax2aroMYTVNx7wSwKKSmTjVM+hVy4x
debug-build.min.jssha384-blnevq2ndQ5sMQmRspatQ/UdUb1YVUCfmXgInoIyMHofIfPl/cHLUcoXQmT+HzgK
debug.debug.min.jssha384-cPmH/WwpRDFRnV3YVNhEvCXlyvfVGA6tK+8ScJx+PSvSm6Vagc0uhyn7uI1fCGdv
debug.es5.debug.min.jssha384-lw6RpG30KU62vcpTz8NSP/R81aZ/LUXeOjS0H3QwlXLVA7FX1sNkFatj5vJ0u5rN
debug.es5.jssha384-WK2XK2bIZm3hyvETMDV2Bp9Ud+gcP6VisDxs77co2DZQI7Radh++IHKJfmrdKVjG
debug.es5.min.jssha384-RvH0B503kOwX2uokkgdxLuDciv0uEPFMXSlO38EZSX+otDRdNTNrIpgJIqcxqA0q
debug.jssha384-SIfWWveNaIyk1X6x6OMTKlRH+NZuIdo3yTisGlJdEQFecJY6YSGQLRhSB2PHN3VA
debug.min.jssha384-VJBzcakZ2JqdmRYbeTwdi3a4keAxgCBSn9LHSE3gdpLPQxmHIGSaJelRWV7mIthf
dedupe.debug.min.jssha384-e5zoIJOvLTSdz3VRA+IWh1oy52AJz92cqCoPWPJ76N4a61NYdC7qPkoZHNfJoXMH
dedupe.es5.debug.min.jssha384-2IgN4gftWwegrj/MaC5LslbWjlJJG1P2D9xGziEAgWD8NE3OcKwCes/EssEaEn1w
dedupe.es5.jssha384-qGC2oRINmR6Tse9s3QVgNMOCHcLsFQZffMAmW6fYDCxC+QiC6E0n/eE0O2yKktSm
dedupe.es5.min.jssha384-ZF/7xoRr9/ZxKD2VnHZumZmaKMvPWbskGYHn4OClmfWeNy2xaRXqKcEl1/NP/y8f
dedupe.jssha384-0iI4MYbCnJTNcszKxQPuRMWscfPt0ZxMxGS3DSP221QgjKaqnDtCC4OHpbH0tOzl
dedupe.min.jssha384-4pRBYdO1BlJ7Ua1jWw68r3QFONnt3dlM1wIKo2+Mx69+0NndTL9L9QYk4UanZ6vo
extraerrordata.debug.min.jssha384-xRMqKhIFkaLlSbCUZZheg8xV2ARVAdRqGS+OXzON/fqN1eD19V+EZvPl6PrFX0KX
extraerrordata.es5.debug.min.jssha384-9t8qqvZ1YwkFZkYLWsg2dB9N9EriEUJIiDKirg7dnnVybLBANuTMy2Eu4h+jV7Iu
extraerrordata.es5.jssha384-r64Eoo2M8VCwlvYysDu7wg/x7GU7d3QXkOQpVi2NwqJpRA8lRFNZAbKfxP57XKoC
extraerrordata.es5.min.jssha384-0I2YdUtAS+ubrR9WeiGO9WzEoTz8vG05D8GBSBrb5Q5YibnIYfJTXFDlHMCleb+9
extraerrordata.jssha384-xtC+/E3zXOxPdJCc28ehmO7CuF1aSsnoNV2kNaIrOfW4Rj3hbCtgYePBcjqzp4U5
extraerrordata.min.jssha384-Rec9HgTqav8L5jRslLQfWfFkiBZv/4OMl3lujMoF7qjiOzn474AsEghZFDQH4Q4W
httpclient.debug.min.jssha384-vufVBeIfxr+8q/gHNQq3P559aJ2+uZOjFze7t+46JxSRZSA2QF3zwKXUTcXBi1gm
httpclient.es5.debug.min.jssha384-yM/hJffizJI/H0sgbhdasS/rbR+9Wiml18mM2CqXIwZAZTHUIvGYOU2nWBgmXTnp
httpclient.es5.jssha384-O2Xmm6veD1IWZ09Sa42aLZCBpnOJIbEeV7N5Z2J9rQwQzF7GJDzUDbL7OPOlHsBg
httpclient.es5.min.jssha384-j5YO21hE3SL4SdVqlPnBmMPygYPT9uVDtOVy+Jvx7NEpteNOs0IWNDMmTk4aYPUI
httpclient.jssha384-vR44f48fu8gTOLrrg2fudB+TxLtZm3zRBzbhotbJJLeoj+3tF3W3Q73jeD0AKYy/
httpclient.min.jssha384-MWhplcZuDaxq97kauHcLS0QhebEcqXNclVP8KphUtvASj2jLYYskGf3ThRAOzIsR
offline.debug.min.jssha384-E1Irjt1TMQJUKy5P1xEgr8Lx540+m5cDHGXdyqJYggRtxlFdLag9MCepP6RIFIyN
offline.es5.debug.min.jssha384-eBZAuhkDXG3l2PRqd3nTv0IJZaIORMgfUX6nDbXJQ/pgBPbFTivEt6Rg4GvustcF
offline.es5.jssha384-l9EsCHlgl2lSMHo6Wfjqo2xQcMXcyFzXO8+oEHgGTOHd79SpLA4rgcYDU8p+xGNH
offline.es5.min.jssha384-gC7gJaMwQYUp/+Sq4bBFzxmO3Vk/xtMUmo0IVGfhOBMBzyPOx1/p23LpL79Hfsgv
offline.jssha384-hraTxnaKZ8riGS4ua4+Tz8qxnJFDxbhbBj4AhdjPQuGTIPYyfpCxE0md63Ix4D7P
offline.min.jssha384-+HY8byHhtd9+/ZC7AOavIh6WW2Z2epBu/PmpvVJy5MNzPTCqU0pUOQUlsIw7sa5I
replay-canvas.debug.min.jssha384-8B2gMJ9H2bLtIwyMC83aqdIUea1tELMPACpnDIpjd9o/kR5bF/MektXy0eWiHlF/
replay-canvas.jssha384-9iDRCD0aXwd2cGyzeGEWamo5AAq/RYA6GSUf7oHpd8vFX9zYxvxhNBJAB7A1jp2K
replay-canvas.min.jssha384-ugYaYqU7dKGmeCmuEW/OIen6vCMaJlNTRS5dxTrv+iheu00y5xS6+P4hFOeJfPX/
replay.debug.min.jssha384-cVzQfskXkF95oJFj7QDPfeFhifxUNdy69ZZV5u5kSZ6G8uUTeBM+JcvAul5m/FmG
replay.jssha384-a/yoVzfVD44fg8GLDwYGuZ0w023dUjJQS9nCjNgJ+5XP1DeUfilE7S1v7K9QtiM1
replay.min.jssha384-YkqJ7aoLRgOVLnuRBKG5ruNmbDUM1ki9SF3V6llD7J3xQO2cBDbZalI/KXjgTfMk
reportingobserver.debug.min.jssha384-bXMqSdVwrYEIpvw3qmmvsAdvS66fb5nhI7g2g/mXgdt3bkQeAKMUck15Eg1vwgv4
reportingobserver.es5.debug.min.jssha384-VeHmPFaAIoHnpIENMEscZjx//vgPPIgG6GEBryblg/kjcksgkVTfVJ7/kmz8WjLi
reportingobserver.es5.jssha384-EjAY9QNCzfnxaGf2O4YMoJ56arK3Vuwq8igxywDVwc/wMftHXz22SexxQwzMSjFA
reportingobserver.es5.min.jssha384-x0riY5D3r9sNJ8TUXGDIDPJ/AhMsqatcHbrMoTnpYbi3RNO2Ul2hm+TuAV3tkWyS
reportingobserver.jssha384-PnZ8ObYMlE/phb6O+WPQy7wrAOJRjFcgXD+EwrqSe+q55UOJEvf3ew0S6yT8htfF
reportingobserver.min.jssha384-B92Am84Vczbpf7V4CStupuCcGeduofF9V/4nsMnh/gouMqQcPhQLPBoRtqySJuIE
rewriteframes.debug.min.jssha384-E0jkbnt+lD3BBBEZEA80yvZ+WcgJOF0U9ZA36yMaUPZ++pIs/sDRLNsfbJh2ajpN
rewriteframes.es5.debug.min.jssha384-FEG29wQuDSw8zLKm4H3HZgGr3/raKB7tui3UltkR2DgNTelTbpgBUJb9SKYdQneZ
rewriteframes.es5.jssha384-koMk3FRAzg7PUFalLkTrHcViXLU7myeSOi9Q60LlmOKHHuF3WaFILUt8FIXXF0eK
rewriteframes.es5.min.jssha384-T1ATDvy8SEkXVI8b0F/tI45kYqXwzQYxMpL76gqohyv8DdsXyxfGGfX8tI5G+b29
rewriteframes.jssha384-1pR1tdjMKeB59EuKV72EgdVTkgHJRBKRvN2BzSwFQ4bPGAG1k0xFvtvqFv3mM5pj
rewriteframes.min.jssha384-rQrlpAoyXEYmnZiHBM7+0t165fuk1YfPAE1Fy3Z3rM9aW+it7dV/LSN3BSM5Zqd8
sessiontiming.debug.min.jssha384-lozEiowPUgOCphA9HLSU2I5yRQBBvwlCzCVY4MD6A14bRREhGce/hbZxIW5z8vJf
sessiontiming.es5.debug.min.jssha384-j3RiLS6gP266e1Tan8yeFlKEnW8aqW5Ad7Giyt6n2YuYM7Uf4Hi/y6FU66GCkLR4
sessiontiming.es5.jssha384-gYzyauVPl65CccMqQ0k/18+yRaFa0PkXfip1TIjgmhcqluBlN31hRzgDaarJ0mpd
sessiontiming.es5.min.jssha384-BWoJQ5cm7f70N92Oy3g+272QvvbzjJYKYAIkm3ksNWLbJDlmJbNJKnXUNsQ7rki2
sessiontiming.jssha384-viFAduZRZ+JY3NXJR4aiWfoDMmiaFLmaF9KTStSrQ1J7rXccRkXwkPBZ9fiiVhhY
sessiontiming.min.jssha384-lqmHyracl3OqtLNv5HofSW+TBRfyc+YsF3t1Xae6pNjGcKxdWE6jen2typ1oUNfn
transaction.debug.min.jssha384-ATgpEMPPIxBIHnEu1VsbWzpmSxRioN9rMTNOUtkqr7Ajgt3cU0QiyVYsBrqGCrUb
transaction.es5.debug.min.jssha384-rniIrDXQXaI/5GoP102Aab4Gnn5xfKNJ4E1S76G8r6A1x+TzZ6vEZ8ZZHmrvghZ6
transaction.es5.jssha384-XXu0IPnzLsZtJXI4KtHiklUwHYSPN+HGNT3spf8So72AMiHsmWyyegXLKJrLal1t
transaction.es5.min.jssha384-5f1YrICRn70JbHqDVgidNLrcleWczFu+zEc7koLeJ71ZV3Ano/zryAxRRCYsa+/S
transaction.jssha384-AcRfp9tJRbGrbKcLQWbAqJSr/fR7/xwG8r+1w/KIhM4VIjrfssuyUeEyzzQfngNP
transaction.min.jssha384-+xsmTNn8ghaWDe+UA8kdIqckvKZV09/fQPfLu48INUhZKnPLrqqLo52rkxuRcXTh

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