Loader Script

Learn about the Sentry JavaScript 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) > SDK Setup > Loader Script. Copy the script tag 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/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
></script>

By default, Tracing and Session Replay are disabled.

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 Tracing
  • Using Session Replay
  • Enabling SDK debugging

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

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/___PUBLIC_KEY___.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 Tracing 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 Tracing, 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/___PUBLIC_KEY___.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
<script>
  window.sentryOnLoad = function () {
    Sentry.init({
      // ...
    });
  };
</script>

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

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

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.

Because the loader script injects the actual SDK asynchronously to keep your pageload performance high, the SDK's tracing functionality is only available once the SDK is loaded and initialized. This means that if you e.g. have fetch calls right at the beginning of your application, they might not be traced. If this is a critical issue for you, you have two options to ensure that all your fetch calls are traced:

  • Initialize the SDK in window.sentryOnLoad as described in Custom Configuration. Then make your fetch call in the Sentry.onload callback.
    Example
    Copied
    <script>
      window.sentryOnLoad = function () {
        Sentry.init({
          // ...
        });
      };
    </script>
    
    <script
      src="https://js.sentry-cdn.com/___PUBLIC_KEY___.min.js"
      crossorigin="anonymous"
    ></script>
    
    <script>
      Sentry.onLoad(function () {
        fetch("/api/users");
      });
    </script>
    
  • Use the CDN bundles instead of the Loader Script. This will ensure that the SDK is loaded synchronously, and that all your fetch calls are traced.

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 tracing, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.tracing.min.js"
  integrity="sha384-DIqcfVcfIewrWiNWfVZcGWExO5v673hkkC5ixJnmAprAfJajpUDEAL35QgkOB5gw"
  crossorigin="anonymous"
></script>

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

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.tracing.replay.min.js"
  integrity="sha384-oo2U4zsTxaHSPXJEnXtaQPeS4Z/qbTqoBL9xFgGxvjJHKQjIrB+VRlu97/iXBtzw"
  crossorigin="anonymous"
></script>

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

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

If you only use Sentry for error monitoring, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.min.js"
  integrity="sha384-L/HYBH2QCeLyXhcZ0hPTxWMnyMJburPJyVoBmRk4OoilqrOWq5kU4PNTLFYrCYPr"
  crossorigin="anonymous"
></script>

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

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.logs.metrics.min.js"
  integrity="sha384-MSUsh4gYWGrtTUxYY2kSs2g7dsdZEE53CYlFhU8uRZm9vletDjIsNJmdeYIen9Mi"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, tracing, Session Replay, and User Feedback, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.tracing.replay.feedback.min.js"
  integrity="sha384-SmHU39Qs9cua0KLtq3A6gis1/cqM1nZ6fnGzlvWAPiwhBDO5SmwFQV65BBpJnB3n"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, Session Replay, and User Feedback, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.replay.feedback.min.js"
  integrity="sha384-hQE4zeAL8GIrDSru7MPWDOLxSD0YCKs4QbkXqf83QrfNvMkwG+szR3ScbVkhBYye"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, tracing, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.tracing.logs.metrics.min.js"
  integrity="sha384-oTF2qW7Zn3Hlsfejh9ln9k/G4mCtMroFoH8HYFESSL3kppWYIqkVTCSxjxrpgND9"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, Session Replay, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.replay.logs.metrics.min.js"
  integrity="sha384-4IPg6s18KpCeNeeyhrsaVsjkTZqp4vpKwce1KkhTyBHXLNYl5xwHqHY1Z4UI4xNR"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, tracing, Session Replay, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.tracing.replay.logs.metrics.min.js"
  integrity="sha384-Sh16fDQ6QeG1BC7Qci2ym3/macyjbo+laKewLeUGi9QlI3xC37lv+A7WOSiuFp6B"
  crossorigin="anonymous"
></script>

To use all Sentry features including error monitoring, tracing, Session Replay, User Feedback, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/10.42.0/bundle.tracing.replay.feedback.logs.metrics.min.js"
  integrity="sha384-gOjSzRxwpXpy0FlT6lg/AVhagqrsUrOWUO7jm6TJwuZ9YVHtYK0MBA2hW2FGrIGl"
  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: "___PUBLIC_DSN___",
  // 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 tracing 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:

  • bundle.<modifiers>.js - Base bundle with error monitoring only
  • bundle.tracing.<modifiers>.js - Error monitoring and tracing
  • bundle.replay.<modifiers>.js - Error monitoring and session replay
  • bundle.feedback.<modifiers>.js - Error monitoring and user feedback
  • bundle.tracing.replay.<modifiers>.js - Error monitoring, tracing, and session replay
  • bundle.replay.feedback.<modifiers>.js - Error monitoring, session replay, and user feedback
  • bundle.tracing.replay.feedback.<modifiers>.js - Error monitoring, tracing, session replay, and user feedback
  • bundle.logs.metrics.<modifiers>.js - Error monitoring, logs, and metrics
  • bundle.replay.logs.metrics.<modifiers>.js - Error monitoring, session replay, logs, and metrics
  • bundle.tracing.logs.metrics.<modifiers>.js - Error monitoring, tracing, logs, and metrics
  • bundle.tracing.replay.logs.metrics.<modifiers>.js - Error monitoring, tracing, session replay, logs, and metrics
  • bundle.tracing.replay.feedback.logs.metrics.<modifiers>.js - Error monitoring, tracing, session replay, feedback, logs, and metrics

Additionally, each of the integrations in @sentry/integrations is available as a bundle named <integration-name>.<modifiers>.js.

Since v8 of the SDK, the bundles are ES6 by default. If you need ES5 support, make sure to add a polyfill for ES5 features yourself. Alternatively, you can use the v7 bundles and 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)
  • bundle.tracing.debug.min.js is @sentry/browser with tracing enabled, minified, with sdk debug logging included
FileIntegrity Checksum
browserprofiling.debug.min.jssha384-0NgDhxOc6XmJglOdmD6LVi47qdHUqFXdzAbpdeQ/TaioCC/BYpURkoZjLqBSxO36
browserprofiling.jssha384-g78uiPl/L6Pr1lgZ2HlpVHqXOsyvkgtbCfRClNOmQHG6a2pRQJXwfusYXz2qWeUG
browserprofiling.min.jssha384-9ni43+JPFU7It4EWsm5uYQ99w0TdlD48g0b6JfNFeh74jQ0lLBpbloSub0s8gWzx
bundle.debug.min.jssha384-xN+eahvoib0AgWXww0PW9d8t7xrNd+u2X4kd/aP+7xdnzB+wU2t22AwbwnpvlDvT
bundle.feedback.debug.min.jssha384-We0+R7hRNSXSrvDqvXgLdpGpsWvhlz7ccco7ib6sWZidZfbmeOvt62oe8hsqX91Z
bundle.feedback.jssha384-jEmE/15dgpZHtj24ejy0AoKzk1lk/3bCne96RR2EvlVY9Dgz61WdubIjBl3AFs5u
bundle.feedback.min.jssha384-ldIMAh0KwXaGlQlhUUQQ97ZRQdneodQ9sP7rLL4IiKDB1dbJ0inDQ3uEg5RdEOJ+
bundle.jssha384-Tg0leZyW52qPSW43BT2KdMVIlGr8pwQEhSCTAUYEsyN3iiWiQH/gB9vJvIqWXNkn
bundle.logs.metrics.debug.min.jssha384-+6nwQBFqd/2H9zzGYRu6pYVtZIGMiZ9eH8kN2UflIIgSSXWC+MVjzH8AVzkhMwf+
bundle.logs.metrics.jssha384-5BJQAhtFldqz5zMj7xm5qejX1T+cDRus+bHxJUfF6YisKYZt/fMDFDLkFn5Qaqm6
bundle.logs.metrics.min.jssha384-MSUsh4gYWGrtTUxYY2kSs2g7dsdZEE53CYlFhU8uRZm9vletDjIsNJmdeYIen9Mi
bundle.min.jssha384-L/HYBH2QCeLyXhcZ0hPTxWMnyMJburPJyVoBmRk4OoilqrOWq5kU4PNTLFYrCYPr
bundle.replay.debug.min.jssha384-qhTcQuzhnxI5cP1hFVIx4dFm1o39B1c/umZsdDqsCnAca8tQHovol/owrhVuha9g
bundle.replay.feedback.debug.min.jssha384-4jgpfMU52moKrzSKCVsPnoPufIwGjdSpXI97+eEaQcStHn6SM2JWaeOoZZREzCXn
bundle.replay.feedback.jssha384-ZuxtV2zK2AW3FfMOaiFg22zJK5TxCsmv0irDT0XtfOhnEuq/9r3kBiweZx039kvT
bundle.replay.feedback.min.jssha384-hQE4zeAL8GIrDSru7MPWDOLxSD0YCKs4QbkXqf83QrfNvMkwG+szR3ScbVkhBYye
bundle.replay.jssha384-fxBM92wg8FF5HE2OMyEDpt2xKXqJZ5czBifs3stpv/1/fxj/SZ5r1nyc/w4jNZaL
bundle.replay.logs.metrics.debug.min.jssha384-9ye/FPoiwYZFFAVaVzhgGjt8RxdP+dy53BdaZpW528MZmTTli1Todg868xIiR/UH
bundle.replay.logs.metrics.jssha384-io/aV13EVfE6EfIj52tFwzVJ5jJskjGeQkZZ1TPyGf35K8bSgKVL8Wz9TXt1xlJ6
bundle.replay.logs.metrics.min.jssha384-4IPg6s18KpCeNeeyhrsaVsjkTZqp4vpKwce1KkhTyBHXLNYl5xwHqHY1Z4UI4xNR
bundle.replay.min.jssha384-sbojwIJFpv9duIzsI9FRm87g7pB15s4QwJS1m1xMSOdV1CF3pwgrPPEu38Em7M9+
bundle.tracing.debug.min.jssha384-JTj0p5dihTyRrrByDpH68e6K0U1WKZVHC3oEd4yKf0ELPO9ohba2Fg7Jj2EEv1bk
bundle.tracing.jssha384-cME1PUUn/vEcZfey9W+o36pQbbZufXLwqTAg2Cw78Om0aTd6fjeKeFzK9AuMUdy2
bundle.tracing.logs.metrics.debug.min.jssha384-0I+TemszgiJjeW7INqwXayCXqdweMvvbOuZU49TVT+bXQ9qcNrEL7qABpJ9QQm38
bundle.tracing.logs.metrics.jssha384-G0n4EHVdsXViz1+mShKekmCZhKiOHEtScm14y4zW7vT3kKXHzJsj2F1jntZ5G1Cy
bundle.tracing.logs.metrics.min.jssha384-oTF2qW7Zn3Hlsfejh9ln9k/G4mCtMroFoH8HYFESSL3kppWYIqkVTCSxjxrpgND9
bundle.tracing.min.jssha384-DIqcfVcfIewrWiNWfVZcGWExO5v673hkkC5ixJnmAprAfJajpUDEAL35QgkOB5gw
bundle.tracing.replay.debug.min.jssha384-goOlwBFtFMKb4IF9AaPUWDXfxbrDqexaAmY4uP1+k1hATGhwvNi3FF0TbxU9EhgX
bundle.tracing.replay.feedback.debug.min.jssha384-GNYXer435y9hg0xmgASKtdY0PZ0tvppNNu3JTUZni/AM3REETQ/afB/l5WMBjphw
bundle.tracing.replay.feedback.jssha384-WLjhb/d37WCVuRuwfDmrKHKbTN2PbN116fH4SQzaaMoFMHVO2OSS19D9rnv/owb+
bundle.tracing.replay.feedback.logs.metrics.debug.min.jssha384-tOuwW2nWqL46iEmDPyX/Yqs1l7Yk/9y6XVKb2KUuenQmFmFLCk7DCmhR2Hi0/UaY
bundle.tracing.replay.feedback.logs.metrics.jssha384-vVDJzquk4Ig6u3JGvQh+gmt33/ikosDVjX4Saj6qcjp1nHAdGq1nqP6LspVMJg9F
bundle.tracing.replay.feedback.logs.metrics.min.jssha384-gOjSzRxwpXpy0FlT6lg/AVhagqrsUrOWUO7jm6TJwuZ9YVHtYK0MBA2hW2FGrIGl
bundle.tracing.replay.feedback.min.jssha384-SmHU39Qs9cua0KLtq3A6gis1/cqM1nZ6fnGzlvWAPiwhBDO5SmwFQV65BBpJnB3n
bundle.tracing.replay.jssha384-O5+DeDoaqWVjKZoM8aF3ZMWOmDgGODulI5Fx9yNoqnMFlNf4V3Pzy7yazWv/MQoc
bundle.tracing.replay.logs.metrics.debug.min.jssha384-gx222Mjnp7ps9LW9jnkADz2A+mfVAeCkmQxTpQRBoCs5bDZjol7Ep9J2ZoU2Z9Na
bundle.tracing.replay.logs.metrics.jssha384-gI18nClpsRFBMkmWxYjTzqFgOF16NCtSRVYumKh6vUxGCB68p2F5Z+wMCl4ZH9u0
bundle.tracing.replay.logs.metrics.min.jssha384-Sh16fDQ6QeG1BC7Qci2ym3/macyjbo+laKewLeUGi9QlI3xC37lv+A7WOSiuFp6B
bundle.tracing.replay.min.jssha384-oo2U4zsTxaHSPXJEnXtaQPeS4Z/qbTqoBL9xFgGxvjJHKQjIrB+VRlu97/iXBtzw
captureconsole.debug.min.jssha384-Rl9SnX5VioUKgMcN55ggKl7AmOhCeocyp6T+LYBVcJDvPdYu++A4QohEgVodNlw8
captureconsole.jssha384-9wBSVImNLAdbKR/EABP0HX5vtt//EoTJigypp+vvcD1OpNh3Tv7JY5Hj0uOKjxFY
captureconsole.min.jssha384-psnr6ELQmJNBCQ7/OFrhFf8hjExsJ3Lpdq/ohJNtFmrhm0uhdXTLvCzld16zbe5a
contextlines.debug.min.jssha384-EmeaxLXNGjKTnGVsBUG1Mv+FlSC+//LA6NfkqhXq7+HUDsJvQTD6bsSERthLctTA
contextlines.jssha384-uO6JyETYXS0v43Cgf6kpYd8/FfpoVi05QszpF4ZTUwgLSJ+PuMWsxy0a2AQJzO0j
contextlines.min.jssha384-rstb5ZIxHBwY0agtU21NyvL5mzv0CzKVwZbxwj24TMeF8YEkmuHG+Or68NwRWcAO
createlangchaincallbackhandler.debug.min.jssha384-yilEj/5mmx3xzyD1NM9OB64/d9r5OrD884l44kSI8D/fvCLKzPNLkmp97ifCpICR
createlangchaincallbackhandler.jssha384-c3MHz385udTBKYgw15DAc/edlZKnBrQAvroD+8Fy/X81OPkVI/Cr1k0+13jH5l1P
createlangchaincallbackhandler.min.jssha384-6NUUw9uODxyKIOXbIC4L4DtSKG+FK6BHfO9X/5j8hCe6zesbFtPeA27rud2s6LM3
dedupe.debug.min.jssha384-ziMrcK9B7/ZcSybcITzovrS/n2bCrx7XL8Co5E4lHFzFjNXcO32AGweTWt+h6x1E
dedupe.jssha384-5PB3XViFLIRy0RzP4yaiUC2upuV7IQ7f2V1Zg9TIN0sJB8mJv3hXQeGmB+03vgo5
dedupe.min.jssha384-rGWxLI1ZyFHrl0yv2FXjFpGcXIAKKDXEtpF/64mwzkDZdROC4PzooxL5S8N6phwP
extraerrordata.debug.min.jssha384-v0hfdExPJlLWhTXV76CFtEd4/mWFnkfsPQzLdeFePEg/V4MI2AvFxRP0pJcSaBBb
extraerrordata.jssha384-ZGETh5JzNExhz41IlOkH83Lv9uSt4qNUZnQWqaywLJDXDwr5J7qaaJIEGUJGQG6h
extraerrordata.min.jssha384-UcXAOu5cL3FVPc4covBX0FnGN09quMScREpukiNPORB+Ke2eNd+mlmlY2JwmwHCZ
feedback-modal.debug.min.jssha384-jzvfcDcXnhVbCfzsf0oshnxDb8ihJHf7avPn0izrogZHiJ0UoIOMaJSF4g7rBF/8
feedback-modal.jssha384-otNz3xk1R5yxyN/VpENLeJFJyjALKBnWuHaW8tR45jfxJ67v4vz/25UAeRiUBq1n
feedback-modal.min.jssha384-NCdL3BwXRH6AJG4Y4EF20YEtdXwsigv+Pkux4bPyarSChBTDYUj/9IVFRa8PJvK5
feedback-screenshot.debug.min.jssha384-0wE9wK1XOJ55eALxV4gw7Y/rUT6zcojSssV/rzxfFRqVzzo6qZadAQLqF0nNCxjy
feedback-screenshot.jssha384-PorcCLaSLGXM4aXMaB6p0h1sDnowsrV6ODJw+nNjgdhY4d2hY+wwPUyXdLXZkNsS
feedback-screenshot.min.jssha384-JOGaorAr5H9kuh8DmrddRwnPXb+l3UciFvId8o21HPtXryM+fJ4IEb18fXRE0C+3
feedback.debug.min.jssha384-ILgzBbwAXHRM51GZv4mk+KA0osPSCmIMTCeo4OnOukrR+8koxFCXcD77v8RMxDis
feedback.jssha384-vL2DDwI/eCun3MuJIRJZlw4qUK67b9rU/JIOGEQry32kyaDaVpmvh9bTwvtn3fZ4
feedback.min.jssha384-rcNwFdBOjhhIcZZxfeGmsPzELQq1C8/OX7PTclmxAOKaLqKXDuLy7hw/NZ9RpzLi
graphqlclient.debug.min.jssha384-qwZGiZgsYDDK8/l6EDCe5h5UcP6I0MV6GuOiJ9sIrATRsvTe+vrjW5miGZstaBWl
graphqlclient.jssha384-bo6yirm+POEEmoqSRcANEluzMNGwRJ9p6vudcZ4ebzbjO5bYJhyvMdFMEOZZ07Z4
graphqlclient.min.jssha384-xtBFv5SWDKd/OUCMUrtemIELjySCuRv5HnJ1rsP4nATZeHuqlvTy5laPgaWsFy3y
httpclient.debug.min.jssha384-dibk88suDVht0DiLhWuKSLc9PJUAD5SMLU/0tj0KO03ZmWCcYVpAgOwTdacgMWWJ
httpclient.jssha384-0fV1lVU/WxF1ebdZH78QJuTtLEShVjVfnvHijhAnKgInP9+exxtMsgRpH7I+cJxp
httpclient.min.jssha384-82m5bB73z2BfpTnxT66Gq3eYrI1nMXSfVKbojeo/RZf23tWO1AapKE0Vlyq2YLCw
instrumentanthropicaiclient.debug.min.jssha384-pkTZW0WZANvD8D7dYMbEMqR6z36VNE6tBu6EuLwAjP+QL792BqBh/HHWk5lQOjHL
instrumentanthropicaiclient.jssha384-L6cnGl9yNW7AZmCQhQRJpIu/WereaFkI8kWcQYp7phHOygJMKaFR2D0MiNR2hFP+
instrumentanthropicaiclient.min.jssha384-he/vNV//uuc/qYwjcUd7Rdxsq5Dc7t+8+LXrlSoXYSOqhoUo2qrpxZr+5xycXTZl
instrumentgooglegenaiclient.debug.min.jssha384-9ZQBRvnzSa4Yg6KWqVKdd2KZ13HjFzyyamhwzjn4YbBhNNBGDGg2Kms/Q8ziOGWz
instrumentgooglegenaiclient.jssha384-Gaess1xHSvP0vtFF+wabJtRtnvBLh2O7Thj1KzgBSMnJ8VRJ4Ob0AstN369swv9Q
instrumentgooglegenaiclient.min.jssha384-wEgoXC2zznezKLzf9yRZ9V7pKqOigJEKMRM9pwplmB2fzVaiyWEHdDE98whn/Spg
instrumentlanggraph.debug.min.jssha384-GpsTInWTj8UvVcjJBuQFY9T/WcR/rgarfBA3AHhHX9KjMYXjqcQ+JGVS95lMgtsU
instrumentlanggraph.jssha384-BQHmzL40RjWIdAqCzPU4ffmFkCjfEYy12djaoWCnCv0kd1E2NGmK+KWuvhTHj6uq
instrumentlanggraph.min.jssha384-LWbC7BNYwguV8gm3fYLjw/1cVZLxsqHlsUCUsp7elFqF1D8OiqALCZ1TsD2a/DJI
instrumentopenaiclient.debug.min.jssha384-8JSG/zE4aqN6O0BkRq66quT9+tSTE7YbKFpDJLhGdGuE/d/Nm2JD6dF0DaxGZaGK
instrumentopenaiclient.jssha384-L1d4k+tKsKWkgjAboVp+pCDSqCENexPet6dHAMCO5QqIn9w86WIEBu4Vk7zy+ddZ
instrumentopenaiclient.min.jssha384-64Ch86TcExI6hURO4BELa83Fbm+JjVicCYByX9WG1ImGlb0UBlw3bAhTcD0KaNxu
modulemetadata.debug.min.jssha384-qZ84cSS17JUvPltMAtD+vfHfQcs/yeCpeVzGorVBDG6RBgYFTohMiRfPCoa2PaSw
modulemetadata.jssha384-xh97HlbZwR1QDZBFcrSHboifAIb2Vpe/MwWUhoB4Ot44pm0xwdAczZgSlIJjnGQs
modulemetadata.min.jssha384-kN9dJQuecyxvlBeu7HlD/tKQN6eOUj6aqIUSIvpZx8tZ5rXVVwvXEqRDFYkdIuz+
multiplexedtransport.debug.min.jssha384-GmoXUl4+pjKUQ94UBv3/36Qazxdsw3DuQoQUy9piwueP+AWc7zOGae5v7FLgepyw
multiplexedtransport.jssha384-VPTiEAWc2lhSXvgxE1FjTP1dSH7sfr5AK9xfWcMQnNXbhM1pIYeQb3H5pgwUDQuN
multiplexedtransport.min.jssha384-p8HeEw7yYcSl/9moL9rH0pJjLSPDCpZz0MHmuysvDyKur6U8PgHLNywONPkNqZyV
replay-canvas.debug.min.jssha384-8wI3MNhAY+TT93h6Xfkz7jGQ2E1hUZVtmEbtjQxkt7dRLdsneAK7ZgrUOR3j632P
replay-canvas.jssha384-DbrAHNcZ4N/ncWrhsj/vqW17J0vEUuLxnsFXjU4ExI6u9wGY/mzqSlXUqRTXeMdY
replay-canvas.min.jssha384-tvwWHrYElU6Wcwx0QfWH8bNx5/V+TVUlBu50HLP53akjWN842BsaNUVz46kD2oem
replay.debug.min.jssha384-TZ0NHK9nSw8A6zsuvyLBFgRbWtxcUwKUSsNDkQvunY+kPM6lfclDYDmcm++5Tpfg
replay.jssha384-kyPHf5tdszvIbAtosHRzFmaZuo4N/VC8jvMr0OF+1JPRmrx6T9Rlnx0KiRsMHHn/
replay.min.jssha384-ZOBPCrmAw8LoiSUDML8x+TTOzqN8DJgtknW60XgmIlOns/jsjYfUqgxjP2QpSuoz
reportingobserver.debug.min.jssha384-PebKklmDGkoRVVKcsyCmW0mXA2wASVsD7ByWXh3u3sp6msffMqqemDv5yFM8N+KG
reportingobserver.jssha384-C2XFtWDw7snDPk/Z1ELH5xRDAthYHMcrwhqJtziSdiVGTVPn9BzN3ZePoK4u8gIK
reportingobserver.min.jssha384-0/vIsimxI4QgtgWbHqLkjh59G1WXxWWQQ91o/ej4/lNSxQ9tez9liWPXblK0AbAt
rewriteframes.debug.min.jssha384-IqfF1g0NBDgJimb6RbfL7n4OfBO73JweNh0IVSMxdAAQACI9i+OFlNcWpotJ5Al8
rewriteframes.jssha384-PWB//b4nV7qTc7PyE3EFPRvIkh3e0uWvQLW03RQx62HBDrpALbuyscDgFFNxctrj
rewriteframes.min.jssha384-BZfvBl5Z/XmPOPa/COOKp5iJse60LRArCZFdGs5rCkiT8jciaRgZQ6M1WytbPsPF
spotlight.debug.min.jssha384-2Ovxa85r4A7cdhYY25GQMSnDaHTzLxB82do4hKZkVx5SuobjJWNnR6wVbubXQUdq
spotlight.jssha384-WdxZPh4VCIqHAGtaKjO3DdcO6YnpdeKHLjIG+Vfm+AnT35pyb2vabrcJaY+W+Ohf
spotlight.min.jssha384-Avbdtz7d2i231KLSG4ESrdj4qAsLOo0YkL1bUPIWdjuXxEWb5liU8WBvMkARSDeB

To find the integrity hashes for older SDK versions, you can view our SDK release registry for the Browser SDK here.

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
Was this helpful?
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").