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.49.0/bundle.tracing.min.js"
  integrity="sha384-MOE/hT/RYJedcB7gqX8p9h/E7Z4YL/9YZi6KAoCOS7kdW/Ys3mG96N5v6eB3qeSQ"
  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.49.0/bundle.tracing.replay.min.js"
  integrity="sha384-fw8+Kd/Gc0YTrsavok12ytUsdh4vZa/urjQ3R9vbb0XOzvhGhMvFeO+kyBKCEL+3"
  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.49.0/bundle.replay.min.js"
  integrity="sha384-YjUFA+Twj2a35N0+dV2v87eWNKFEF4lT3hPkjI4YMR+BhlOHkHA4dDu//p1HIY7c"
  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.49.0/bundle.min.js"
  integrity="sha384-S7BhZV9XTuFNcfSnKInK90hxsBeF33y6cSDSgc80Mvr8HMOpvgpTNR8uh1x4gMHS"
  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.49.0/bundle.logs.metrics.min.js"
  integrity="sha384-Z9svR+8a2PnGxzKS+oV2s2p8kWP92SJEp3mr51iZKz8xQ19F5t81rdE/dKniyq9S"
  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.49.0/bundle.tracing.replay.feedback.min.js"
  integrity="sha384-0ZkwCYEATv5RVfij8MYZsfuqVpU1r1ImLS9cIhvtacppR3QQlLVZ1HTj1x5dlrgd"
  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.49.0/bundle.replay.feedback.min.js"
  integrity="sha384-HZrECG/9nqmjbiu/MJ9eE+VkP7u7ePDuyBcUZE7Txl2dGOL8L5zBWXh7Lo73SIqu"
  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.49.0/bundle.tracing.logs.metrics.min.js"
  integrity="sha384-qHFGxPsOvH4yY3MshRKxpQeL8QL9Ao2jT/V46HOdpMZ7TK3LjuZISqBS0wRHyC4F"
  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.49.0/bundle.replay.logs.metrics.min.js"
  integrity="sha384-6CDPkw7w/i2oYiRysJz/n2E3jLodKD7z9tsXeFMQ95a8nbX3kBJx/1I6S3NqvDOL"
  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.49.0/bundle.tracing.replay.logs.metrics.min.js"
  integrity="sha384-vDU2M+5HRwnPHeWJYzj3c4uZEPghTjxZfdc1njdPNBZJW4vgxUU8rFAgLQvjFyZn"
  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.49.0/bundle.tracing.replay.feedback.logs.metrics.min.js"
  integrity="sha384-nd2BLgLYAJ3I0eJntZeb+EmGTrmNUKu2c+mRzr5JoYFUcrwdi4IozwKVCSqPWzHD"
  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-/wAh4UmyhAKQtwoRnSLY5788lq4YJB88uTTGOLedy5M5kIJsKv0AMVCHe4lWKyiQ
browserprofiling.jssha384-KEPykXSuBiOj3wZlLAfAMGVtM4dyI7K9ovHXk4O33NM14qVtEXoVzueGaskT+EmO
browserprofiling.min.jssha384-1Rd66FtoW0u6aYJ7MoOEc2WmesIkEqAHc1Eqx/8UzHHO5l4T6qpzMqlp0mY6C8+o
bundle.debug.min.jssha384-CWHE1Tn1xHK7vCVXGlbPkGzCUI20vt7Aa2OBFv2qdvjQEiU02tUuzGGzbjKFDerE
bundle.feedback.debug.min.jssha384-dCa15a9quxlHDyKiI/VmcvG+GQi4kx8WR7jWNJwFump39TsZyBaXjtoqa+Uouu19
bundle.feedback.jssha384-dwdftyYar1tnL34tOye4EGtI01YMNIbGwE+82AjTqPTc223Pi65Xz+WpI64WKlD2
bundle.feedback.min.jssha384-Thqmmrd23NYUf3DrmnyBlk1M+LbraVcmDYvCg4b/1OFYWpbTnfaftdo/e7bkV+8q
bundle.jssha384-NCbonEie3UuEoqoZnW5dM71HbQ6NqOUSiSAhRMNVGxzB2jfW/ZXsxbnP1Ks8JtIn
bundle.logs.metrics.debug.min.jssha384-P8MJI5cuQRwX5ShCs+tEYt9gc5dAjb5MaiQ9cKYQCSkTxM96qxBqLQOjOewkLNEN
bundle.logs.metrics.jssha384-vD1rEa+Q7VnWylXj2sjlTfCnh7NfJhgb8TufUU0NUQN8wLgp1hlkMxya66cHZeHY
bundle.logs.metrics.min.jssha384-Z9svR+8a2PnGxzKS+oV2s2p8kWP92SJEp3mr51iZKz8xQ19F5t81rdE/dKniyq9S
bundle.min.jssha384-S7BhZV9XTuFNcfSnKInK90hxsBeF33y6cSDSgc80Mvr8HMOpvgpTNR8uh1x4gMHS
bundle.replay.debug.min.jssha384-oCMum6SH5b3PewFgZtSrZHguEFU9E6++EHrDejBw6BQ9ii1wW0JoTjMGRlvRu269
bundle.replay.feedback.debug.min.jssha384-iz2IIc5EMXAR301Bc9ApGsQpMJMvZv1XJH9oqPYHr7BJt5UokkSjzzb7yNA5RzV/
bundle.replay.feedback.jssha384-Jqa3GC/zeoCQYUCQdidkffe/DmVljQ4+xIPRzZ8gRom4nRT92TRoetU8sqDwposS
bundle.replay.feedback.min.jssha384-HZrECG/9nqmjbiu/MJ9eE+VkP7u7ePDuyBcUZE7Txl2dGOL8L5zBWXh7Lo73SIqu
bundle.replay.jssha384-tRPnSLLqxxOToY/tWOdgW+tTJbFs7Tx0fPmABbCQsnBiDwcnzPzNIa78Q3vR4NQe
bundle.replay.logs.metrics.debug.min.jssha384-Sw1PV2WMmEDKP6JulPFA4fRgK1Brq9psuYSbOjSSLGl7poMFWMRelhVoLgwDya9a
bundle.replay.logs.metrics.jssha384-q8lP63o5pJMpP1JIl9xMquMMCOkhSvoQKni0SPtZbK93p3ZqDA6CSqhDNhTGkobs
bundle.replay.logs.metrics.min.jssha384-6CDPkw7w/i2oYiRysJz/n2E3jLodKD7z9tsXeFMQ95a8nbX3kBJx/1I6S3NqvDOL
bundle.replay.min.jssha384-YjUFA+Twj2a35N0+dV2v87eWNKFEF4lT3hPkjI4YMR+BhlOHkHA4dDu//p1HIY7c
bundle.tracing.debug.min.jssha384-3Zw2u39iwhghKSnzZMjeuLlE8BlwpwU7OWhG0d6xWKaaC+R4CVAkBsSekd65CpfJ
bundle.tracing.jssha384-IyESY0D0j2LRBT2CUqbjdZhhHDbaHZdXjGF4GSWvce5iCjsNpMGv019YdtECAPer
bundle.tracing.logs.metrics.debug.min.jssha384-xGFoXnIswZBS9sAi0V/ztSBa8EqR8WlzKh43Tkss5Ek9NM8F2bjDl4vD8xihjV7J
bundle.tracing.logs.metrics.jssha384-4rHvCuS6bVym89yKXZv0VAed3lOwm5g03WmnU9vrStUHc9bQ2ZeJkHxms8R8VcMu
bundle.tracing.logs.metrics.min.jssha384-qHFGxPsOvH4yY3MshRKxpQeL8QL9Ao2jT/V46HOdpMZ7TK3LjuZISqBS0wRHyC4F
bundle.tracing.min.jssha384-MOE/hT/RYJedcB7gqX8p9h/E7Z4YL/9YZi6KAoCOS7kdW/Ys3mG96N5v6eB3qeSQ
bundle.tracing.replay.debug.min.jssha384-CYL4nPGQkD8OxvAPEzXjwYrr24BHS2O1XWaGgQaG77/vrgQJIohh6lit/c/VLJY3
bundle.tracing.replay.feedback.debug.min.jssha384-GIe0uHs7W8mEwGvX7YckYzgYjElPFOdQMj5fZL4f7HFNz7JT9svEdidT/NJz/NIu
bundle.tracing.replay.feedback.jssha384-jFy0/eVxQYC7IoBu6QZn9E8aauew+fLdSw+v2tBKZmYRTEuEsGxRS6Df6TJrgXQO
bundle.tracing.replay.feedback.logs.metrics.debug.min.jssha384-G2nFSdNTZx8NLnUFAxiR86T3wx3CFOilNdz+8bfBo9dEBhZsdszjkkI3LLjI/bg1
bundle.tracing.replay.feedback.logs.metrics.jssha384-AdScr56WJUodtWb3TZtstwRp+Gni/RiBj0MWWIg9aRHLCo0jrsXiOHMZFsRmbmG/
bundle.tracing.replay.feedback.logs.metrics.min.jssha384-nd2BLgLYAJ3I0eJntZeb+EmGTrmNUKu2c+mRzr5JoYFUcrwdi4IozwKVCSqPWzHD
bundle.tracing.replay.feedback.min.jssha384-0ZkwCYEATv5RVfij8MYZsfuqVpU1r1ImLS9cIhvtacppR3QQlLVZ1HTj1x5dlrgd
bundle.tracing.replay.jssha384-IV9B4/ELxZuDzDEJ9aWp6SgcvxTjhcQcikYsqQ9o/zIZv3RXTnsrQMYJvqSgmzI6
bundle.tracing.replay.logs.metrics.debug.min.jssha384-5fxc0ZO5j/5IQv2NMOplb+7D0zOwonQ1ch3JNQB01nXfgRtHjvR9Jf5/oktn2OrL
bundle.tracing.replay.logs.metrics.jssha384-RkYQ80lSOZZ5YukemhCRUB6sA4bFDHWx9Xi6cNypYZgueUB0ag8s3a/9Ez/ZGTmt
bundle.tracing.replay.logs.metrics.min.jssha384-vDU2M+5HRwnPHeWJYzj3c4uZEPghTjxZfdc1njdPNBZJW4vgxUU8rFAgLQvjFyZn
bundle.tracing.replay.min.jssha384-fw8+Kd/Gc0YTrsavok12ytUsdh4vZa/urjQ3R9vbb0XOzvhGhMvFeO+kyBKCEL+3
captureconsole.debug.min.jssha384-zpmlHHvz2yGG1Osak3Min2pA0y/Y40F/KV3wCsooxIbv7CX5sYGDvuLXx4NeuW3R
captureconsole.jssha384-/1KMGoikGLvdZSqKCuGGRDPuIwOte1r0URQR/1r2iMnEhxIw9uKaXEYGDvexAxMt
captureconsole.min.jssha384-FAaruyvq2Q2CnGa0abapSRhADhVKShwpEmCx1a33XoVXgw2aFkSxd0k8DyGAmmZW
contextlines.debug.min.jssha384-U6sOFaSvcjaVX9YQ1fR9xdO5uAzBzOklF4ydOnBvfPvu2xOG6FdKxV5D37yDv+YT
contextlines.jssha384-q15Q5XQa9ncUGbIu1sGFsQfWZuDqmoi4bKTu/oVQ0qxKzLwzyZdVH+uCQxF2qAby
contextlines.min.jssha384-JV9l0nf1ia0+1U4DnbtNuNlzWlk/vY6E/7iOCK2UZDeimDskewm4laRy7reD0lli
createlangchaincallbackhandler.debug.min.jssha384-c0sKkO9F7wBamV5IS4Jad8yw2qaEHl0f00ORczmUz10nJTawSt1pl1tFCrbNsCkx
createlangchaincallbackhandler.jssha384-H47aJADA+z8zxHFKAf4P7wTcpU92qASW9bH5qtQ6IIHrd7O1kEyMAjkRFcAtBmTb
createlangchaincallbackhandler.min.jssha384-sPL9JHMv673AkyOSQBydUvFJsrJ//756tmL2TLsHsYW/+ztoNbpnA4F1nJOIuaLD
dedupe.debug.min.jssha384-VKcYhKj4ylco5/fbDauDTs3+MW4nrk4n7X+PDD1q4rycujJ6tt5IqX7u3tr8QaHW
dedupe.jssha384-YxoZO24vy9J88n/wnQuAqBu/PXnYiOjpnnDS1aIydVVVlxS/THoYwxktv6XnHwye
dedupe.min.jssha384-9FbwIfNCEJV0lseUoEXm6lqrL6Bu2llqXPTN625xk9z0K3XJEsCev1wwCqgZ9dH/
extraerrordata.debug.min.jssha384-UmydpaTXikbZK/9s5fvX5ob5JTDz8C7PtFaXrrzDLiKIJvs2zCr5kfB4xeqX6Kc7
extraerrordata.jssha384-NGb/u1Y8atMfMr5j3/f4Okt+vDlREWDt1liBKSOh2tSzhUm5opfd60u9fAMP4GPd
extraerrordata.min.jssha384-6vtFF00kO8YPCLmLeyFtw/52N+ImbXBFKhaaftXfgr2LBiU9vbBmhfddMfPWQQdp
feedback-modal.debug.min.jssha384-s/u1bropQSoyAqHXZoP751qtjsGhwrlMZz6PnONUMks0FWcRGvNwq3su0bWDaymG
feedback-modal.jssha384-SQCb6NoVselvdDxkmC4Wc/DOmBu+181xSvxuj4b9ICHx3c3zgTmuRrgx/hNaJxBp
feedback-modal.min.jssha384-ubKkSc2/L3VJTO8RAa2PtrVOS7p/P6EuGULqZpuS9rns2D3PhuDYcW+UcMKKsKUg
feedback-screenshot.debug.min.jssha384-Ye8tuQYOarfx4nonLcShk+PhC45mj6e60u/xn77VXZjM/6K6+CjLeGWAb4unyuXn
feedback-screenshot.jssha384-jhvxSYCeJsNHnlN7NLrN8CVmFLYG23n+uFFBX/QUFPomW2ssgobuglSxSHZXFA9f
feedback-screenshot.min.jssha384-OYaFKGo9Hk7Q+UwNP7NzvBMT3gWXVMdPzFDBg0Q8c2h7+5G1qZT7NM+tBQxkHFT3
feedback.debug.min.jssha384-4n9k7a4dDoIsGVnpyOHQUeq0G5lpYMFN4sOf9Rp7XmCs9fSjwXLxzzbR62wYZUlv
feedback.jssha384-XI/uK4oguP3kVmxjvlGccYscQ10kstfg4nTfHJENCbd/MBEDgFKLwi3gsHPfP2yr
feedback.min.jssha384-VKeCFCGDt2oCEFwr2TtHxcyMgTcUdypTmUp7sLCugrebXHvaUKexwwC9ScBwmHAi
graphqlclient.debug.min.jssha384-DCm6Fo4LnlQwIM6xzwNCUKHMHE6RS89te97KE0PM9L0B0lOD7/Q7d4A3bwiLCLq0
graphqlclient.jssha384-eOH2caT5mfJ2G9ITyukcolUEQ+EyWRfRmphaXnm1MisaQTAsID0y4AH8Oe1lra/1
graphqlclient.min.jssha384-zymFNoP6G/8NwdvCxiNNFgRnjVnTawMq6DrX9EIV3+3Z/5um9WwmwH8hcPG3h0bp
httpclient.debug.min.jssha384-wG0AIn6Aw2ZSBbKu+XActBzgge9W1wDU4SfMQpsd5XrJgseQhGE2ZIiNlszL7Zuk
httpclient.jssha384-0L35H0734ECODUGqLzFID1d/pIvA9sxClQ3H13aXI/7zWepovUKe49+GRpk/LVmm
httpclient.min.jssha384-B34OCuea0m/QwU+4ZgFoTknkj0ogxCufGZfD/O2TM7ToKkFMWcrD7QtKwVUDbyXY
instrumentanthropicaiclient.debug.min.jssha384-5MVh6EGOyShtPvPdpLugbLcHEUULC6aYR5ItYyMie8hRO42rRTJK0P4r2Ia9967Q
instrumentanthropicaiclient.jssha384-Qze1vncbvYnicCsgcBoG1Jo3i3NAfhONrD8/hwCAJsEyzEtbvpI2XGHfCS1G4lQj
instrumentanthropicaiclient.min.jssha384-g1hSEHl/e/AXljwM2Cj5CPphNr8fHXAOpN/OXl9wuxmUVg3tTRfabo9Jphlajze6
instrumentgooglegenaiclient.debug.min.jssha384-YtBchzCKjk6rcGO4RQzAFnRHt3/Qks0XOgEHX5TYAu7xt5VhMgYOwuzdz5YHBdPz
instrumentgooglegenaiclient.jssha384-9EEsq5lTlo8cuT504JbrCfPdrMenv+MyO8RyHGnk1DBqLRFdJT1LCrtGndTKoLUn
instrumentgooglegenaiclient.min.jssha384-afVmh9nSUnLGhcIj3ifTASTHOA7H9wiExTgnSjTmBxqWAxNw29R6mbnq4JE+n6PF
instrumentlangchainembeddings.debug.min.jssha384-vGBLcSGrvWlpfyyPFS+KrXwXYU5HdtaisGvIfBcn2q9PuheFOZrKlEECdG57H67V
instrumentlangchainembeddings.jssha384-NBkzU1Uml3zoMUPDyZCxrH+PVLZi7uUdH1hSrQXS6wmxQWCMoVTaJMADHJd4Pshq
instrumentlangchainembeddings.min.jssha384-tX8ijQmvDzBWfe2VjywTRk0YVeTWWEJrhP4D6nssc48I9jRua5OPWYzMEzZG+or3
instrumentlanggraph.debug.min.jssha384-JS3gFn5zfdgsp4WUH8Cb5HiNwZqN8aPEkzL6vOmtMn+Ub00zOlZ5KATyq+yQq0sH
instrumentlanggraph.jssha384-QdRXa2zVq9f2ftDj2OK4vGM1Pe6Gx/Jvff+KS8cG3exIgZ3/nLd8/inRNXwIbz5Q
instrumentlanggraph.min.jssha384-JQEUr6z1W5DvejKB5iZxLnN8T6twWzz90N9Lnjbba3aHLQd51kmzJvWPYc9nZ2KB
instrumentopenaiclient.debug.min.jssha384-WPdq2nWQLOjWFFpaMM5ifLU2EotccVemmx5FIiwAWC/FlayNgMKsLZLwh03kOZ4m
instrumentopenaiclient.jssha384-CKjxMab4LKHXyHjuSfMxxLddjlWDBmjl4I7vNtUyTjuil7lN6zE9mcw0lNmucK1h
instrumentopenaiclient.min.jssha384-oBjvItTwYyH+eOWbMumjbg3svekx8rK6OQAlpp25G0LjkEzciQniRoYghL1Ilf+y
modulemetadata.debug.min.jssha384-IzQpvoMZ79xfJ0laZFvH8ME22nEMNJV2XPBed+JQMWftdxf+SXJWgw5/58MFWuSo
modulemetadata.jssha384-41Wz+RR3BpEnLT8nWolNrr4liCX4bZrEuh+FfqEwtpksOvSwVMX/eKrgoQDwqU74
modulemetadata.min.jssha384-gLVKzqFXmJbsiWL3FjhnchUFdY5VJT0Wk2v3rFaXHELjPEV+RDsAGrjUC1Ixrs8k
multiplexedtransport.debug.min.jssha384-etqKMB7GKcO+qOuKgCxzwp8qskG5iaU11fuVVTmsOBRy75meklYS2RNxFLmtU1gd
multiplexedtransport.jssha384-BREAjz3CcHn26yRuHE4+WeQh/u71iQiLyQJW5TO7qGkB8v3kHJoK5TyLBmA1YSMc
multiplexedtransport.min.jssha384-vPzkm90WKHSV/9Pkgs71/h1s3X0nJ9vj6yaz2X/a+zUxvULkY9JXy7TA4ZcxV+B9
replay-canvas.debug.min.jssha384-tMdHit7pdeSS7mBIng31xHXSRQvefCqcGXw1d2lglRdUhDm56jVZy6NCyzr26T1n
replay-canvas.jssha384-Xh1/nXD/wDAMPWIdubS2C4lLBmOgm10ZQuQhZ95A27G0hMur6Tob4lWshpP4X0bA
replay-canvas.min.jssha384-0U5qYec0aDtN6SRX5VjQQs4AD/TNCuuLh2KM8ZN5R7mQzMW1tIZ4Ss+fO+MffxS5
replay.debug.min.jssha384-nyvQ23KZ3hVXifmYJnl0xQ6VP6oROs0W4eTn8dLW/VdHLna/2p0PevS9GC3vs+FD
replay.jssha384-DDATkMX0fIMVlX1I0bC59/Oi1KRSWn/Nz1HGKDAf0Q2baCsT64kfFQNQFJeg+/li
replay.min.jssha384-bF39UtCciYO21KigT6/8okUEgbkya6hoign8ICPadkpH+gp39+OkkMISa7sydpmB
reportingobserver.debug.min.jssha384-A9fTb5HRLeHVfz8Lyc4zIrvKfpjJJGYQaaWJNNBjNSZs/P3Moj+gRgkQ5fsOf4TC
reportingobserver.jssha384-XWMnv308YWDAODbEE6AgiPaZOzOqraWyLsg4tsAoFY2oM5i7YnGKpwDImp0Ebj1m
reportingobserver.min.jssha384-nhOinaxBwtOU7LJMRsch1aFxgKBxPxFdevd3r8OkrFEXCZFd3/nNb7lHAPBmq1Xf
rewriteframes.debug.min.jssha384-B1rHVr3remvbHHAkmi/BOssT3Qbo/mlb2vl/JC8BdX98csZ1CATtP8DHPzw/WUyF
rewriteframes.jssha384-dG8IQHgZPgHj23GqmgGrbx1RylFS/qtGy1D9/1/F5nrxr++PbQIfpKLSyHBFlGku
rewriteframes.min.jssha384-ilTn7Jp4dvi+oA0JuhrXIvMHNgaqQISGOKCt7u9EZ1UExUtjAr8i++rHm4SE0oXg
spotlight.debug.min.jssha384-+GWN8/S5Dka38oZxigdjcSvtSNPj3kkyqgttCGFqv+ysKSsq3SR0QshfGlfuE9Cz
spotlight.jssha384-2YrmsV+0jIKnnCChEIHu0ka6yaOMKp0E1cWfWshYF5mUbrTiVCkgSRrSCFmMrS9k
spotlight.min.jssha384-UtQlu8sIA72Jll7YbFrB0B+YJntv90o2MxGEgAAcqECDB3jqNPZDmbPv8kE5d356

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