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_SDK_LOADER_HOST___/___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_SDK_LOADER_HOST___/___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_SDK_LOADER_HOST___/___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_SDK_LOADER_HOST___/___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_SDK_LOADER_HOST___/___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.69.0/bundle.tracing.min.js"
  integrity="sha384-Xl/pZ2YgviohWlNZ2ipnBKfonCQ2EKaXzusUClBh8mrgAiDZa3outR+4H52ZSOz9"
  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.69.0/bundle.tracing.replay.min.js"
  integrity="sha384-MD8yGlzUJGxSGvGu8Myu4qJfrBXaCtR6cYrkEFJvv/7u+dX4peuDFEi45ccaQABK"
  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.69.0/bundle.replay.min.js"
  integrity="sha384-1qW4DnZb4gw678+NKCnQkWGoqSrdinRJjVuqwa4m0t0rDk3d9fQwRC+ZJyl6jaVR"
  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.69.0/bundle.min.js"
  integrity="sha384-3CEt/dsT99DjKC3MgiUAiordZm0hoZjYMn6ioBvRKm+9A98CLWAUsQsk5XaPpjfU"
  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.69.0/bundle.logs.metrics.min.js"
  integrity="sha384-K3LffZv4UrtW4BJyE9etB+kuv90sn/dAQvo9abUadljM8ikH/DAFFiWqvXHQ0JYe"
  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.69.0/bundle.tracing.replay.feedback.min.js"
  integrity="sha384-MYqf3df88IARhd6SFXGE6GuT/Laybfhi/vpKSqFQKknTRhtSxiXnc5rIDOWmqWmz"
  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.69.0/bundle.replay.feedback.min.js"
  integrity="sha384-R+gtvHWnZXA9g1bHqQAs19uVdRGEM74V7elbK9UIZkLt05iDEfzPnu5k0xp3LKNY"
  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.69.0/bundle.tracing.logs.metrics.min.js"
  integrity="sha384-QtJdFs/59TNq4l7XKOuXSD3SxkXNRyU4/9/vgMYqyIG874+1NQ7qMYZMCRNVEL0K"
  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.69.0/bundle.replay.logs.metrics.min.js"
  integrity="sha384-GMH8869AgslHG/XKtmzMinnw8X90lo/h3bOJeSSoa97yyWn5cLLxA//DGIMXwKWM"
  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.69.0/bundle.tracing.replay.logs.metrics.min.js"
  integrity="sha384-RW8XqsfdAPAWzRlHvk1KMldtYEO+22egu9dEpKw5DadllUQychtswPCBMuk492GB"
  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.69.0/bundle.tracing.replay.feedback.logs.metrics.min.js"
  integrity="sha384-undaSQZ0M1eO7G0FhOgpeFm7m4Falbm5ibSMdUJIQRhPeJjDw4cRwhu7zFBgEVr2"
  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-o3CTiFWiNdqAku8Lwb7xYHSh++g5OvaKy8MNfdZ9Xi+fEUTFHUiSHAmlhjaE4KlD
browserprofiling.jssha384-UOegNlc0Irs95V6mkMb/ygJ7tkM45ERjnVTc364aNJNspOoz5n1sUMc5ePpRSZGk
browserprofiling.min.jssha384-HO85H3aeJix+7ucA7UKZEN1nQD9A81P8M8sV/ZIFRLoajYjL0Cd/yqjTb5acOUnO
bundle.debug.min.jssha384-oJ/wa8s65jp5jayOtO7OrrnDau5nCSszU0z/eeifhSf2dUopMuaqpcY7RF/EQLiy
bundle.feedback.debug.min.jssha384-fyPorPJDn5uUhIZcN5ojWbGAlnNz/5XHOSHe8eBzQj5/f5vMRX61RP+4F4x6bUPp
bundle.feedback.jssha384-VBWgo0ywrs6BNhbhHe303eMF83b8k9DujSfcbwRE9g7tPx9PIKgZphAsUkTEMw6i
bundle.feedback.min.jssha384-IhgzWBgkzJm+jo+BdjVXT2pmgxPCEfG5IwGLmGOXhQUSaXuYswtq44y4xhnHqBat
bundle.jssha384-A7ZorQLK4nAXKzgKAdyEulNqFCL7N8hbXyeq8+3O1EMkI+/4a6t++4q5DVzANDtS
bundle.logs.metrics.debug.min.jssha384-l1ND3EiVhWn3jL4c7efuSAXvh+nAdicq5ifuITWO2K9sXXi+OdUBYHfUGYFFFAon
bundle.logs.metrics.jssha384-k2r7SONSYabMiDdj4v1+wh92+uS/6cFUGijnMpEMLGsNvRCfiqaa64X8oEbnIEQC
bundle.logs.metrics.min.jssha384-K3LffZv4UrtW4BJyE9etB+kuv90sn/dAQvo9abUadljM8ikH/DAFFiWqvXHQ0JYe
bundle.min.jssha384-3CEt/dsT99DjKC3MgiUAiordZm0hoZjYMn6ioBvRKm+9A98CLWAUsQsk5XaPpjfU
bundle.replay.debug.min.jssha384-2wDRaiQ1hYt1ScUKhToc2Ph/pk7B/TIwfCuWfXO+XbKDt73dm4ygKyJQTBEx0EsB
bundle.replay.feedback.debug.min.jssha384-YxS9P5VWsXp68AaCEFDdjsdbWByUuUmi45WRoRLyxrkw1aYhiAb5IUw/YEUYKC/t
bundle.replay.feedback.jssha384-RAb2H0ayeb9SdwwPCCCd8kDI6yQlZXYjrI2kDq8xr52uZ/GBbI0evasbZLzuBd2r
bundle.replay.feedback.min.jssha384-R+gtvHWnZXA9g1bHqQAs19uVdRGEM74V7elbK9UIZkLt05iDEfzPnu5k0xp3LKNY
bundle.replay.jssha384-LOPdzsL1li9YuF2iNEI35V9aRJiYuodA2vPu+qm/zsv//qK1IzptIEYRVsx6+pfA
bundle.replay.logs.metrics.debug.min.jssha384-1VcuxqbVIh7mfjN6WzoiAupS6/RFnDPsWiFiphmPSCui0ytn22KjLdUhJ5qVQcV8
bundle.replay.logs.metrics.jssha384-bPtnLZjdbh5yfvDqMUsbES2zgBkvsP1EQGNeqDerlZxx+UobsKBwSPm1PuykK+8R
bundle.replay.logs.metrics.min.jssha384-GMH8869AgslHG/XKtmzMinnw8X90lo/h3bOJeSSoa97yyWn5cLLxA//DGIMXwKWM
bundle.replay.min.jssha384-1qW4DnZb4gw678+NKCnQkWGoqSrdinRJjVuqwa4m0t0rDk3d9fQwRC+ZJyl6jaVR
bundle.tracing.debug.min.jssha384-ZZt1c7aWJnlNy1q7Z/DDGpvOyhQYrs1LByH0C/ms7AWb8RWHacOlt7CX22blfzpS
bundle.tracing.jssha384-+s5+Ob/DoNRuYkzvjnKFBuJKedsi840zrIOktmgEm/TIAKKngaL0z8szPBfh/hXa
bundle.tracing.logs.metrics.debug.min.jssha384-o/oEqd4kiYitshx7YQZxGXz+OUcQmkfaerbAAvbBnEGnO8yb2OP4c6J21jEvQ2FV
bundle.tracing.logs.metrics.jssha384-FseeWzjTq84khNh1oRK+CDR37s/xWPY3SZYR2FfuE0hpdKKwMdndIIiC5/U3zYtj
bundle.tracing.logs.metrics.min.jssha384-QtJdFs/59TNq4l7XKOuXSD3SxkXNRyU4/9/vgMYqyIG874+1NQ7qMYZMCRNVEL0K
bundle.tracing.min.jssha384-Xl/pZ2YgviohWlNZ2ipnBKfonCQ2EKaXzusUClBh8mrgAiDZa3outR+4H52ZSOz9
bundle.tracing.replay.debug.min.jssha384-9e9/8gHQ+OD+6g5TVR/Vqu+QloeVn8sjYq9lUq/Pq1/EC3oaYJNE3YShErCR7t7R
bundle.tracing.replay.feedback.debug.min.jssha384-1Mxyv7b3aQY2Cq/ktpqLLob3Myizsixm8mPkznHlXUTwa0OPoSU6NTYUTZAwEebq
bundle.tracing.replay.feedback.jssha384-owV23nwTIQFQYeaqsD96H5fwmOqHHhCNyWlzZ54IZe7b5qh3DDBRlHHi6dwk2vzJ
bundle.tracing.replay.feedback.logs.metrics.debug.min.jssha384-FKWtodyvC4cS10E6XBeJ2S/v5Kuc532BqpEwduDYrYWwg+pofpQWhDLxTsY/kfyD
bundle.tracing.replay.feedback.logs.metrics.jssha384-jLsb5E/GmrzvG6P45xbJCrAwag8crqLYELEe+5XXG5JgcV4/6gDrpeaUW8kNAKBa
bundle.tracing.replay.feedback.logs.metrics.min.jssha384-undaSQZ0M1eO7G0FhOgpeFm7m4Falbm5ibSMdUJIQRhPeJjDw4cRwhu7zFBgEVr2
bundle.tracing.replay.feedback.min.jssha384-MYqf3df88IARhd6SFXGE6GuT/Laybfhi/vpKSqFQKknTRhtSxiXnc5rIDOWmqWmz
bundle.tracing.replay.jssha384-As8Fnblgq28FMdIIkoMqrOMqlgJ5bNNs+eVfJadnMqRe/mZfDbxnz7/VYYx6hUXg
bundle.tracing.replay.logs.metrics.debug.min.jssha384-rhakPj1H9aieqa6gmsuJSWidpowoS4FSeJXPKGmWXOvfYhzPZcvqQkHQ+lL1Zxki
bundle.tracing.replay.logs.metrics.jssha384-vbWZvExLvYwhVdF81oGSRazKz47MsWWSWrnSjxuvK5gWw8doM7J16Qti0h+XWkcY
bundle.tracing.replay.logs.metrics.min.jssha384-RW8XqsfdAPAWzRlHvk1KMldtYEO+22egu9dEpKw5DadllUQychtswPCBMuk492GB
bundle.tracing.replay.min.jssha384-MD8yGlzUJGxSGvGu8Myu4qJfrBXaCtR6cYrkEFJvv/7u+dX4peuDFEi45ccaQABK
captureconsole.debug.min.jssha384-v1rjndkGz3sDbBEbYJVBsjFRG+UmB2jTN9gQCa0EM1dicDhouKBU9KT8cd9NixmN
captureconsole.jssha384-K4kTLHia9qa4OIjAkfCsxAAPyoGzQC1Qf3N2eVGalaAzj4uLPCriSh0sEpmj5+Nf
captureconsole.min.jssha384-bKNGfKNwvp1WTWDBBpI9Bi5r9j8GgNm0o7j2QNzAbjyvLz1kT+rw4UlemxjF67uz
contextlines.debug.min.jssha384-QasT72n0O0CO6NhXG1HZVnJgUfTHW0ywH8beAIjVRG8ccZQEiMyjU9N5t0ivqJe7
contextlines.jssha384-L8dckrFm3Ulx/Ng1LPo+jWe/LzIDo/F+yWhS86OlkWgu8BfIVCvYZEcbYS0a6Img
contextlines.min.jssha384-fRoQ2dt1JZLYOuHpM6Trx/dPpe0hWAhg7rM1fopOr1HmBM2d59i5eZDt7XBwSRSm
createlangchaincallbackhandler.debug.min.jssha384-13Qv59ffA9N0dj98yOrcG1rvtjjpbX+yxCWUOBHAOWWz3cndUe6Rs2vvpg74x5gr
createlangchaincallbackhandler.jssha384-n9wI28l+NBDghS3lOzfSOcr0vcO+EngAV816AdnLoK6OvBvqoGNjjbrsl7eXus8T
createlangchaincallbackhandler.min.jssha384-tyf+AP3XNVowhIG0/a2wLNy1mCHGOQH9wEjxef4gdxqbRopx1ukjHH/Suw/M5hxH
dedupe.debug.min.jssha384-wqh/4L/Y/j1OaBcotiWgKlhYXY+I4y9ECVtdJsnS99Jj0Om0sh4jfQ5xG1FIt3LT
dedupe.jssha384-Zpz9PuI51/H4kqRDHi1QzDaCki5zQ5HBr/kD9N0IdjJS55VNJtWhxy+vmm0qujqs
dedupe.min.jssha384-U9maEX9AJmIH5xFy14hcjoFv1Fsu7cGqNBmYklXyPe9vZyovxyv562zalDBEm1XW
extraerrordata.debug.min.jssha384-/TRvwIMSou5j5F3o8V+gaKHGrRoK6Z65we/pxXtRzSeKVrfg9Usk7vrmrzDzKICW
extraerrordata.jssha384-O2+4hi7Hild3L6Rs+DW6JSk9vHA9OaskSgc0RIj4TgERkCQYXXLid4bXFsqpoRYs
extraerrordata.min.jssha384-3paKcYyPaY5L2UKf7ZX3s/7/c3ZE0RVoViow7bV8NE56A9mcLlGnw2L1d2Cjs76Z
feedback-modal.debug.min.jssha384-5i0eqqHKj0dTR0C+pxwcsPG+B0kB8LwqPTalo1gZoK48Oe0itSGae7uWVtBXLh7f
feedback-modal.jssha384-3UVWrCgwfuTJRyfroZyDMJwfkdpjGPaGY7gP/SWtLqx3ReIAfTATlLohYXOSg7jA
feedback-modal.min.jssha384-rnQNGl7ZQb9hQ8BupI9ropzlX6Uujyk0M/QQWyDJy/1ZTyJizuLN6r72bQuhwXeV
feedback-screenshot.debug.min.jssha384-HyeT3enwWNS3aa8vJEcPj/p3SsxTFTdxdg17hv0nhkhGje47luqXr3MT4Sqqz9pJ
feedback-screenshot.jssha384-RtviBC6P2YIbK4iDfJ0J4K0o0wsJZETvoLdG9ltUWeM1zd+2z7mV8COFrcfRPXCW
feedback-screenshot.min.jssha384-Ja0GX0L8SgxMI/PPBRHc3OIhM+fwnMXmf5fpU7dtHxEugthVJcJdZLg+MRcvZsqX
feedback.debug.min.jssha384-B6L8J4Yo5a6jLIDdFKP+if6KJKVTSbDAEu6tKr9UKZUL9HFwX+NAQSaa4pCqy2vP
feedback.jssha384-zvW8lIMIgYL3XusCCm9jeZSnsmowb+g6KA6Su9aT5LaYPhPVoeh885fU5fQRmYrx
feedback.min.jssha384-nuqXfxkeOVd2gWPlVq4U5zqR0JkWN1C88e8i19s0wnladfeEDtKZkIT63sELdZ5v
graphqlclient.debug.min.jssha384-fSxlu8IHZamo7zeFSH0SK5QxeHW7AmDBY6kKZB3VMY3f0NViUzk/CmgtPLJ327L9
graphqlclient.jssha384-DV0JkQo4unJAQS8yvV1Ex97s9XQfHUA0M0fqTmpCkHcmn/8ubXkBkBwk3/lnuMQX
graphqlclient.min.jssha384-9WYZ9XqBrMoibBdZxz76FEqh6ro6ASWxet5+NHiFWKExRzdx7yCIy5B2Dz8Bpw3n
httpclient.debug.min.jssha384-z3leOEw24SmjP4wTas016nJvheCsOnG91M+PsPUMEJ8yuJKq9o/daswgyQXhWUZ+
httpclient.jssha384-SCtRA4wGhkE8WN+L0QMWJdU5rq+8/JjnOpb1HkB9qCeqeiaZsKtIw+qt9toZOiWa
httpclient.min.jssha384-rwwBkiK1H03d0L5uSMrIuhrcYk1uRKmdGgbzlSs1QcW6XVwEybxXEb/+s5zgiM5U
instrumentanthropicaiclient.debug.min.jssha384-Yg78zwYSSUNbdOnYLVCigslPfozDMVv0orV0WQXhH3XlVW2LhC5Sp6AQFrCKBWNF
instrumentanthropicaiclient.jssha384-LB3XSh3k/m9GNRnQGT9oRA5ondhCifrgOYylEK5+s6oGRxLlwhfuM+WMCH5o/afR
instrumentanthropicaiclient.min.jssha384-GxpcCFGVkB66DDLTDFqtnhY3vd+v8L7v/P5LF/IL+j0/wSrUFXDlTfQT9tqxQa9j
instrumentgooglegenaiclient.debug.min.jssha384-yyYIguLWg3EoTiFzBUvJQK3LaW0WwtmtHMUxgGXZX2Yhwg4yXM2JMwG+kjVKIpqy
instrumentgooglegenaiclient.jssha384-gqK/NtnSg5VY8EZHoXFH6h6GrwPlZXFm2v1q9LxkJjCx+sIT9FpWPbgBZ9l5F1ez
instrumentgooglegenaiclient.min.jssha384-nbM9TDWKz/5S2u9WwdF/hYVU6/Aj8XMoIGvygoMfqRZy5clhzSmiE7VAYU54RqqI
instrumentlangchainembeddings.debug.min.jssha384-tAqoQ+5skP9bq7DGkA5IsRiUqMb3oP0F9ESc+lSmSy5VrtSHyzNuEZyBFr9Zj8AC
instrumentlangchainembeddings.jssha384-NNnIKHmWpc0N53KALbVbrKQGpTdTYxpVq32IGwEo/9tgfhoKeimqt4m15oKYQ6Xn
instrumentlangchainembeddings.min.jssha384-LJ5JIY/759VI5IuiScL0oJfoj61wVseQUMNO0IfYyrNErW9czwvg8KDNhiKytvHt
instrumentlanggraph.debug.min.jssha384-J6c7imOp2Z7XcAmKupZIRnmBSitWroNNUD7eSqPDZP2BhfZIQ/q0v/h3QFJjmkWw
instrumentlanggraph.jssha384-L2rsHJSv8FU3KS3QPnvLpvlkfY0w0QUDxAXvy7eO8HpFVvqzuyPnlM0tsMAGg9od
instrumentlanggraph.min.jssha384-kOG/qs/DUe0Tv0sTGCECJt51ExoQYMGHCzKrTfDKmGc3UInJl9pzAxfDGWvyp+qI
instrumentopenaiclient.debug.min.jssha384-j5c5J+gt8omRCHmH/GFsN4UZe8O5fFdgwDbwYWwxaNq7eY+uBSYy9g85/8hsIasL
instrumentopenaiclient.jssha384-L2ZsyvVfLLOXUGyNsa5jlcBU+KZPhuEbvmA94fEpiEi8m1wTPYAVygGQF06EEQOa
instrumentopenaiclient.min.jssha384-/hf7OrbJlSGHn/VS7UemxlX9uBnFBcgymNGeyQYnz5r2lLgLEuKTNFbcBIeo0DYo
instrumentstategraph.debug.min.jssha384-g9oZ1ld1iRJ33KBGUdhAiNXaxZoaA6B+7lrBDi8Ufpu9t5ZlTdjqtyfnnekzdmZM
instrumentstategraph.jssha384-M8FLdBthXWXP3iQsHqOhe2rNp6BBFF3yoQMCSuqWhV76VfeZ/MQw1YqMDL/7bRlb
instrumentstategraph.min.jssha384-LSUHb/lSj45f5FcW4EFR+/VG+KqF70Ih1iD/MUbv9ch5TWkVRLYdXoaVhwaUqXLK
modulemetadata.debug.min.jssha384-oN15GZaYQxVJYwDsQ4STTiqxcfP3LMG5EBFBdTTA/QvKi02why10rNh4cbL5FmYH
modulemetadata.jssha384-Br8KFgbmRRoLj/jJAM/7R08mPQa/kH2D7KudZpiJqDxHC5jxuOOh3qj4dbM0pITQ
modulemetadata.min.jssha384-uXP2PNfnFbPwJqMGGl7SisdsLZ0ZEZLfaXzk40C9W/2QtfOfMHT9vu9lxuEBrtNz
multiplexedtransport.debug.min.jssha384-gk9z5iYirw01muavsR9B7bK9wjh4l17T3DlXKZBmUT5SEs1t5HqqbTVK7XPZjc+w
multiplexedtransport.jssha384-pCkILIqrEaMuCpC9oFDF5H6xid9bXpz7skS95jdDX59EMqmgwhSdUHSezQdCUumF
multiplexedtransport.min.jssha384-EhLFADSsTedIhnfluae7g5v3qxB9ynv6TOfP9tURhW8MB8v8j0ciiM6jegkWYkrH
replay-canvas.debug.min.jssha384-VgvFgiBfSILZosJk4neVvboUuR9UXjH4mLrYKAlRi3M376Je7nJWJtAgHqcfHdFh
replay-canvas.jssha384-EDE1rhlRMbRDZflMkBpI4C116sZtOBUoeLzmjdtCo+2MMPrO5Zr29QtC/95fbA+N
replay-canvas.min.jssha384-cCMvfjA9GQgo8TxC/oPiAdyKqlPASRisDu1rcmWXLFVpkOFLb8lia4de8JgPNNrw
replay.debug.min.jssha384-EKN/Yr4QsEBy0TC6xv8IVF1kNAtdzbYNxed3bV4DSFqr6S9noijyqe8aEDk4LevX
replay.jssha384-mwZUWckRdrnwklgdE7QAGDVx1la9W739wuhCkDUFFmoUzJMyR6u9I3Z7QgciSJeT
replay.min.jssha384-DfNKeMf2BQBBrelIPrDQI64hI/Bd4tt10jxiXAOLFAj8Yj25yjgWzEB8EppPd86A
reportingobserver.debug.min.jssha384-yUQho61+LuYg0Lazcd8HQeeB3HmX7j4IGUmAe07iTX7lpb/GEik3pCvv0PTqLGzr
reportingobserver.jssha384-M/MSqLrjXB6o8s7kBQPHm6JElaHkN/lOdSBSiBX3dj7VRkKGq54CCM1U00bzCjZm
reportingobserver.min.jssha384-f4AaFBWBFXnVy2cFuKqXUuwqo3SpPdysmXsgXF29+V6+rlD3gOShchaV8FxLNUUW
rewriteframes.debug.min.jssha384-gYRS2Eqpxc0Pt6baiWLdiZj8LOOpR8odA1VisujjaljC2Qy4CPAHymcUUuLIvDhb
rewriteframes.jssha384-8eBRBBTWlZwrqyJj5pnrkQvZf6xLqkftZp6BLrfduqhmL4MjIzLiYfqIpQsJ2TEM
rewriteframes.min.jssha384-1/nscYyL+mj2YSAlJgymy7hFoTpaqCepGjlt9M+vP6MyktV3xVAx0kLRSe0dmli3
spotlight.debug.min.jssha384-RDNvCujFv4k/PwMxFNi7000AT8e2uy0f1Pt9eqHY4rvDaho3pBPS7O6vWuTFsIWe
spotlight.jssha384-z32IZCc17PjNjrAx6WtzkD5kTfyEmQ+yum3RIIum7F9F6ja1izbMv/cLelOZGw3x
spotlight.min.jssha384-VOgFYZZXrXGgAsFKxt2ZVPym9ptuGRAutoZQSaSfosoiZ4n9Tw1wdGoaJXyuHjqN

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