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.109.0/bundle.tracing.min.js"
  integrity="sha384-FyHLiOgn1wcBUetfKq3+RF+aukePV5acbpdkgdYJRWepBQ8AMoNNEucU/6+JYRuJ"
  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.109.0/bundle.tracing.replay.min.js"
  integrity="sha384-yUeLF1YOBa+gnOMSLMiMI/kkW40NC9CjlKj9I8sVm98HyWD6s57bVosZwg+Hp8Cb"
  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.109.0/bundle.replay.min.js"
  integrity="sha384-+WZ0LDqK5/RUDV1mMFwrSDBe4SKUDbDQd7EpobU9CZjrQ1KhO4j2tik+L8TpgT19"
  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.109.0/bundle.min.js"
  integrity="sha384-r87PtLtqCNRN7WVYDoF6b24tH5mzHdp5/yxH2SOeuEBA43ZA0bIBOAhNjDaEveGK"
  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-NKIPVSKS7F10QNu+WEAj+YafrYtDXXoOul9x7XoLDcqyE2/SfKHwepjQy+oOzc0m
bundle.es5.debug.min.jssha384-yWzaVShl2u57bS4WvzC1ZrEzlGkgythdc+b6aP99DNTsMH28NmkwJ47I0B4qokk7
bundle.es5.jssha384-eRHe4iC5kzWuOmkBZZLFZiso+dof/AHhJe6PGYjcXQk/BSw/ELk8gTjMA6gI1VKN
bundle.es5.min.jssha384-wkmIfBCUDoA2TYYl8y2/M2oaT59kMgugl31ass0pYaOAlj52zqA0TEA5g7O/3/rm
bundle.feedback.debug.min.jssha384-jUpPERPgQT1+UNugSvjkFzjCv+SFgki6NdfTdelh4qK6STbk9mGSi6YfoTl2yP3q
bundle.feedback.jssha384-ZK9OYiRm5j4TCn+Hj+W7fudOKwUpn+jezdzrHSne177Q+1DoOsPRt5FpJZmUkpp+
bundle.feedback.min.jssha384-CLq0JrxcNWT2GoSPe6CeCi7qnru8D1mbmwTkOcqWk+8NEWbqyQrayXYmq8tKx2k0
bundle.jssha384-cgy17R6ohyinC1VJhEpeNTv36a4W/V4Zc6Z+ECJdzASoy/Hjn6wtawD5SaQcynou
bundle.min.jssha384-r87PtLtqCNRN7WVYDoF6b24tH5mzHdp5/yxH2SOeuEBA43ZA0bIBOAhNjDaEveGK
bundle.replay.debug.min.jssha384-5hyqHDUJEmx5zn5b6IHFrCwKQDr0o5gS9H5oWJonYGGZ0ue6oaFKmG+CYO4ahrgB
bundle.replay.jssha384-cYMuxlHNyJ4ODKQpwsXLb5lFVzPhSwQW3K5hPBLTlJq1PEX826uTpGUdbWoJdZ8H
bundle.replay.min.jssha384-+WZ0LDqK5/RUDV1mMFwrSDBe4SKUDbDQd7EpobU9CZjrQ1KhO4j2tik+L8TpgT19
bundle.tracing.debug.min.jssha384-KGaPnFOysjXTbxFltSpfchFWqHFRomCPWak83eBN+AXkX+RVwGzimBVQQ7Q25LgE
bundle.tracing.es5.debug.min.jssha384-0E7rK6RBuJtjq/5qAy6L1HN1B2+pLogtm4p6prOG6MZsyp3XkTLsbSWoEsP/FjOx
bundle.tracing.es5.jssha384-AG0tdn7odnVaWjnqMt9Sr9tsJVwWAurNDe8NpMZ0yrllLrg+LrdJjJCdUDqKjp7v
bundle.tracing.es5.min.jssha384-j6eUBn40t5BHGDCVPOLEMz0O/sbp2LBHQjtCI2UDhce/AWAXfZoL0Eosj3VV2I6w
bundle.tracing.jssha384-Tz1A4w3OMXZZqyxVFnhAYagV0HDEeRKZejBUly6nUmNQ1KPz6PZYZdHXiTX5fIAd
bundle.tracing.min.jssha384-FyHLiOgn1wcBUetfKq3+RF+aukePV5acbpdkgdYJRWepBQ8AMoNNEucU/6+JYRuJ
bundle.tracing.replay.debug.min.jssha384-UD/cy7XUDLqtHO5qMd/fckhBgH9RcG3E091WuuNxlxicdTVL6m5Q8rY9pTe7oiiY
bundle.tracing.replay.feedback.debug.min.jssha384-zOPtm5B0A0YcDeuez/ccnsc7/fZRsvG+nRP/DthM0HTNa0a/+U7V9IB69rL2f71+
bundle.tracing.replay.feedback.jssha384-DATLHRy+w5JcB+3l0eFoviZ4v9b8urBbnXt92OemYut/5PxYw8KK9ga9XvIGYahj
bundle.tracing.replay.feedback.min.jssha384-UOHtopg/2oHFq5gWo4f6BqumWrpIqfa/oQLQmiDgvvmBHR3GYxNhnZsd241Rs8mt
bundle.tracing.replay.jssha384-+5Fd3PRLO6ciWjvpxKCboH1+LIDx0vt5KmhYF/wKBfmY9O1x02g++td48+V8u5KK
bundle.tracing.replay.min.jssha384-yUeLF1YOBa+gnOMSLMiMI/kkW40NC9CjlKj9I8sVm98HyWD6s57bVosZwg+Hp8Cb
captureconsole.debug.min.jssha384-gEyT17Zb64Ci90cphC39WUtJ+aNyfD8GDtaTwvNM/cD6h6GlhLudybJN4WV81FkB
captureconsole.es5.debug.min.jssha384-G7U3gnjLQVlYHR3Gr7YhwQuxdB5VRdx4zerD3RceMsIX/OgBr2Fhg/0/GxUBTzHR
captureconsole.es5.jssha384-B2Z73JSn2UgkkS/sVqBCibPdemU26Gnp7kfThHzRjyZelITHO84e7D0wGuGMsuVM
captureconsole.es5.min.jssha384-xI2tuHAcWrkiAiAxJFNkB/FZmoDKUPrfX60W83TZEEAsLxEhCk/PsrV9JF4uIe1r
captureconsole.jssha384-e2d8UEg3BRvS7KgW3wtAN9Ef/EFRKo0iBwVmBmSaiv8sjlSH9NyJXBs7cdHId4CD
captureconsole.min.jssha384-+2LALLUj+SdJI0yuBLkqecbgRJv6LuNZpSkbMFGFN3Tb+bTEWnGyKpK27VkjRHak
contextlines.debug.min.jssha384-D8yBHhHuWT2d0o6ALYodBXPVJ3CVa9kQVhhD2fWyn+W2hbOEiR7NyTmOc6fM6Ulz
contextlines.es5.debug.min.jssha384-TzqT9WT6aImg4sgkGUpijrxJMJXw00rrTyzKlOqqPLiuYTZ8G4rEIQsBMNsfWPrv
contextlines.es5.jssha384-UaVgRgyXpWVjimhRbaslbNm2b0Wsj9dUDew7kaBLzzzKKPFzFkkZXnc4YFyUp8e+
contextlines.es5.min.jssha384-BfRG8hivNesbn7DLOKcW4izvMtabKZCoEhUh6bkHbCMHx/30lEzV0Eq7CA4s8B91
contextlines.jssha384-vetAYsWIpXoTIrL3w/n9Cnu/RufAo50SPEFArzigKzm2a8+0DLyeq75Qy27tqKUR
contextlines.min.jssha384-IaWquLVxSMajKin4a96KtsrY3K3ljjdtjsXlIbX+bhA3sxikQmOODaWIlJha/8qW
debug-build.debug.min.jssha384-v3SsMkz0iwPRiy8bHYk+waIWtUmuAHkZRMKCa1YNNJskJb4TExPFAs0WLjWqxJnu
debug-build.es5.debug.min.jssha384-iUKDi1MYdqC50aLrvj5p6eicIMxHIAZcAfFGsty0wz2cAiZWTwrTkBIFy3S/iVRT
debug-build.es5.jssha384-q86RYFDEQfbb9IBHyRuvoapatKHqjca1qo+VVlOAb+qpKtYBzkEbZimL/5RcnJ+k
debug-build.es5.min.jssha384-ypVWGr2sdiPASysh91uVj3q/VRROTuRyWGDELmNNwMy3x+zIgbRs63OfNTRY2hBM
debug-build.jssha384-614EMS+/yKo1AoL8AHqaAG1MDmEndREVAMvxMhaYt14pZHbaZe2eRKiIxnbOB83J
debug-build.min.jssha384-rkUKxvvkS+0hOZ/S8H8HIhLQU8TgKCBNkBasqIYJCNL2PSyeh+HZpU6+FEVXpsym
debug.debug.min.jssha384-KYV+f1l7XegYA8xPUwnkKzW8QknHCLSglRoIMBVqQ9/YKcArZPLk68E4JbySgo+x
debug.es5.debug.min.jssha384-D6hcsJ3XhFJJTjbArFAIrkuHJVSvCoRjgu+KkOgD6xzWTZVoyBMJs17Q+FducUPU
debug.es5.jssha384-+WiIXn/MMQyIxZ+U9cGuO4HCNLULdjKlYwCQsHpyz4g/77JFs2h2n3L2sY9Rfh6e
debug.es5.min.jssha384-hVMrIDlVxBkaBDbG7SNrFDCjdtqHOVShZP784v4x7BaDmnKgHuY9hUbFmS0qvQrQ
debug.jssha384-7a8Y3eFBADl0pe/t7oyj3QQ+ygencoeTih8EMeHQiVzOusG6qioDAzwHQ+MZeJaR
debug.min.jssha384-2eOAF9Tvg3oPX4xxMbSxnBkP5eA/E/KQf8hT/FrF8VyJ9xCQcfAlb2Q/Zm1vTu15
dedupe.debug.min.jssha384-a7EZFIKDTWa/wi/mJnx2AIdxs22cKefLv73EJEunkkDEwqzX1uFO0o1U4kd8GS06
dedupe.es5.debug.min.jssha384-seY+MKGIGxCSw8qqsJmbOtQ3794+rKq76MF7pofmqrBXmDkDqakJloUtWVc5BBop
dedupe.es5.jssha384-SQcHJGg0QzRRY9wfhUH2d+A1GGdzY++96tDg+ImN2Ld2sfvTJC5U2EDHRfh0+XTX
dedupe.es5.min.jssha384-YgzCYQz70ipFqwhYQjfmA93lZ6at/euG/tbwbISiEG6GKtgpdH7n/bIhVhRN6zt+
dedupe.jssha384-pjPYTsNSYmlLnaXimWQRyQCRLMaaRrjgq41BhlScf2TPnbkAk2AvQNwznCP9fkhO
dedupe.min.jssha384-Fv2dKdLnf9XF/5WK+rZ9HpJ1YljB4a42vOX7o13nBZcZzoff2oNILKM1bIVNr9Aw
extraerrordata.debug.min.jssha384-XDl30DXltK+TGdf/aj9fl4LkEyzHpgs/6YQOe+fWa3rQ44Babtu17KNjRHyR69UI
extraerrordata.es5.debug.min.jssha384-zGZqF6/7gJHDDwxYSaEZImHkyTyNQO3EtwG2VASxZERVBew1Z7XQ02rHH4kvXSAo
extraerrordata.es5.jssha384-nTb6bUXmCUntd3tAnp4ztnJI3LZ7MGPWRleNvhZbwbIzJGkWCkuLi95tj7f46VjC
extraerrordata.es5.min.jssha384-ks+ZGSSq1S0n9x99tJtdPA/FTBbvfCmZq4sILxsUM23Y34buDRuZxTmIoSnHumOA
extraerrordata.jssha384-oB85xY757pkY9weuv8O0KOit8p/xRFpk9iOjRy7nMZuscqyK1iRcky+DmZDESC5u
extraerrordata.min.jssha384-IhSb0EsGTinJG4ngSSq65vbqAfUs/y2lr+rUXq1iFld51P72laFdhfQZ0T7dP7zW
httpclient.debug.min.jssha384-4gDp1KMn9kf3G64+/qmI86fA3lpB2hEr2I+InPqPGFTQvKA1iuTP9HHCrT5fRMng
httpclient.es5.debug.min.jssha384-K9Qr2GBpFYtCSNp17zliXwLLk4As3a7BzHLjtTtvwkt35td5rYc5p6IpweTgYepx
httpclient.es5.jssha384-je77wRn85pEdC7JJdEoKnVWSmC/SgMzpqmDJjkls0k9KDaXF5PmXi9UQMuZ6ug5Y
httpclient.es5.min.jssha384-PYP/qAOsBL9L27R4ocQxdBUSmGnK6qNOAJHG7ZOeN2nIVtz35A+AeRgVozQcJQYM
httpclient.jssha384-5UR7CozLsKHcu7BAo+Oixf28OlBoZMRsxg/FuoPck3AzpjmH9xh6/MUpT0pF5kA+
httpclient.min.jssha384-yv9aKk+lI0rK+9seRqpVVJi33kaPe28zwxe3lNj57Vbulv/+zgSE+bVfDzorFzJg
offline.debug.min.jssha384-5is39sOkurIXfwum+u0GRxN3oPkN8Os29dvkCBlJIlnpNflDhAOsCtWD9dif2Cl8
offline.es5.debug.min.jssha384-rj1CWAEWk3zHZLzi0yatKVyL+68tZxyBgt/XCgO6A7eFxeBTBKv/v5a312ljZK9A
offline.es5.jssha384-aOq3xRY2EzJR1kjnohFrt9qOlPsc3mgm9+AbsYJfrLYcprazOE1Lmy8I0rXHDw5Y
offline.es5.min.jssha384-Xey956+izBoERwWag7NE6m5fj4/wMfImC7kVzl9CVeAt+cyoNKqKWqwECdhzYGjk
offline.jssha384-EWNM8jMbryhOFmkU5XQOrUyZpT/wrmBOE64hIcrxGA5pvMjikXK2124y5mgEIi72
offline.min.jssha384-DFPWTawpeJ8xUh4bBPCdhasnsVamGaIqOLFj8XUs7CGnqeEnrdZJ0jlxXc7pJnQB
replay-canvas.debug.min.jssha384-Ywf+67VEMtxuKGax1Xm+w9Eq0kDgNE/JJkZP9CPjaY6dFQ37NXQfc6Kk5VNXemY1
replay-canvas.jssha384-b8AtwMAvCzbFOkKou06QZZ9n9DwK3Np4OspGwwuusPIA44XASJY907KmVKIjwTOH
replay-canvas.min.jssha384-KlMVWi+JsCoZDaIPvfLYTjBmeOEfEN1A6sq2B6skCzO5klxOzXAaeyr6kB1GaQv0
replay.debug.min.jssha384-3yXOGxf8Tf9aWdydVmkyEXY2DduvzjZ+ltxFwXZpbEQWNbzt37jBPurwe5QeSt2b
replay.jssha384-1a7xj86ggP0ROvxOYcR8S9Ch/ikW88ZsTAgGTZ3aGmLPBUusdCWcz8JrDG+luk36
replay.min.jssha384-2rafFCE2MWCATB7lv70WNwgtmZxjBLy8UmSLRuzs7Ty+mwFHITlO96VSZ+pEO8Rr
reportingobserver.debug.min.jssha384-RWSa8D8bJI+TOmk1WMR0a499fFh7w5zrSun4OAKGhAC8yA3fdeNY+mMNIVx0OfK/
reportingobserver.es5.debug.min.jssha384-5fe9b49TRumfMHFKjLkPXKc53580ZNClpjHwoeI6X6iUNHqcDD0hl0PloxKamM/G
reportingobserver.es5.jssha384-bka19O75v6S/rwOgsq3Ayoshw6YzK33nUs0oFmERZ01340oNbcqHVpRxxPFUFvc9
reportingobserver.es5.min.jssha384-4C09DcR1qqhJcCOxWOFfkzw9OolmkImMlRFR1TV/Xzr9bjFwnjrQ04wNaF34k9UW
reportingobserver.jssha384-IC+qz8lmlIO5s3UZTvsePqvCSTvcuk52LbRIoejDyt5hYNlCEsocInAaDtsaS0ZO
reportingobserver.min.jssha384-FNObI+uaKb8eN7wMYqLlm4Y7lEBysq1XfmO5awbsVwowNU1XIFG6BeYQFrZf1ZnN
rewriteframes.debug.min.jssha384-jv5yTRtgpk5yTWpBTQmcprBkVtD2DkeAUl6v7M1XKuGH8GU8uaQV1MqWJqycGC62
rewriteframes.es5.debug.min.jssha384-joE9GRgR7NZxoL46wk0AAqMq0bL7dMAXVnBGRofeWDOs7cgyK22yXJ/VXA1DD1Im
rewriteframes.es5.jssha384-n0HXGsElqiQ7IQgXuErX00SLS81cPb5LG6MX7yKmcjrJ6lVt1/xVgkMs3IsVw+C0
rewriteframes.es5.min.jssha384-4MavD7xZAS/T9FyA5MYpJUxEmG9JZAdxfZQn6+Fn3+3Zz081X7RwlC5+FSd7r7iX
rewriteframes.jssha384-siBHLoN6INIqF/VV4g1JOHyCJ1mmdUwKG/87SE6Ko8qLb8Wf2poK65NimNF9+30g
rewriteframes.min.jssha384-YhYny9kFx1fTqu27kyWiqep26SgP5fwd26EX8Bi7BPAyaeQ27s6PQcby1/sh7hlC
sessiontiming.debug.min.jssha384-fs8hmoPePa8mpg2GBuZZrF3liydBt4hZvB8NPG48DJ3VX/4YHftvnTGRxjChibmm
sessiontiming.es5.debug.min.jssha384-DSWFdsJzgWBM0Vcj7tALRviqBUvWFKdzgFb0zKQ7/EoKPXdkvsaRZJ1Edq2D7FHY
sessiontiming.es5.jssha384-2c7fdjaO8H9s81EUHbya5Dgvl01ObIVeVT/ufVZH/Px8EZ66b9J4OGR4Ei8m+9zv
sessiontiming.es5.min.jssha384-t4LW32laPgdiUS49MWQXvkUSEv9SpzQBQjMU75J2wKH4rqHeZ6WhobfUtsLXI21E
sessiontiming.jssha384-9amvVWiidQT/+pKWiltCp9bZxTViTnoPdRKGBQQ6MZnJ/ypIRYGEw7E1FAvSD5hj
sessiontiming.min.jssha384-HJywVdsuBMn2cySulVRBZ5pKwBlL16kZg20/xOEDeV4/sH05iLKcZwx6wiDUXhlc
transaction.debug.min.jssha384-bdGYOzQQw61xm2K7sRfO1dYbq0zh9xNzhN6TE+pWfmvtscNavpSZ9O6OSIovbqnW
transaction.es5.debug.min.jssha384-KtZMHDbwUAoarahv2KkpXtEu3vAIycQx1JhpLxKx1fR8FrQzN06xFzPR4bp8Z4dU
transaction.es5.jssha384-3HhMpQzKvqrNLyvr3II4tbpRrwhexzgqj4FaeXfHmB4cNeiTwomKvxk8gP4YLiDz
transaction.es5.min.jssha384-vM935wdhaRIvEcFRMBdjKwcWCQJ9+LMiDXkmPmu8+O0tozzNLM6OQw2WOWSzQTpT
transaction.jssha384-2Z2CkMv2+n7/EzI/aYL+XKeeGYEPeHkGBAZEGdfh2hGziY1rM+EZpscQuSTumt6M
transaction.min.jssha384-CtAMa+KCdH24GqRlKjCl3Dmr8TNtexmTeDn6JAVtEhLpZZqkjD1UTd0OQZosfSiy

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