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.110.0/bundle.tracing.min.js"
  integrity="sha384-AW7fAmtSljXVfwe7Dukjfbi0Qktn2FWEiYrH79/C6BrhJ6rePsHmThRaPUdTJxad"
  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.110.0/bundle.tracing.replay.min.js"
  integrity="sha384-g5zg7AkbsD31xiTleeMQMHhd4v3t+N5PsGU4vxlkD4YAoN33xKIMcM26+h2Zi8bE"
  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.110.0/bundle.replay.min.js"
  integrity="sha384-f15LHz5xcEeJrRZN36ru6WjQvh9OmOpgHh7U7A3ZH+X/Fn1c1y+5fLq2si/vBEfU"
  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.110.0/bundle.min.js"
  integrity="sha384-GPiYhYWFv/ENAs5wt9t2TXRP+f6u8TlNbaLQXZj/ypaiPKYh6MdQ82kS2UqGo0Yl"
  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-/qqnTZsazFlOazlZxyD9VryOM/kq/NrDBpRo/soGpSvAHqkXWVIPdIpzN8PInG4s
bundle.es5.debug.min.jssha384-HZYs7yULLJLIbEEqWN0law5e6Fll+4yWBEkgcYGEk2U65nf4cG5K69NvqiRe+S33
bundle.es5.jssha384-pygTUP61HKQPwWO2AB9xotSnrZXNWivueSnmLf3eIwVUlkgyudrqYm3MzculoWSv
bundle.es5.min.jssha384-s8tmZwwSo1LEsqu0dl8Bv7sMWgX2JW1z9AimRuqx4MMPFkDd1S6U/fQifFvc/Xs5
bundle.feedback.debug.min.jssha384-OvDMcxhp6THvIDIsJITFrxxY2LRfyzrsxcicyr+DSYWRkcmqgMVd6a5e/Ru9ubg6
bundle.feedback.jssha384-2XT8SpgFEl43eH+ZJdb2LKONwBP+5jk8fc7fyi3l9M3W9ywf2UDxvd99Oh3nEvTv
bundle.feedback.min.jssha384-kFYIAOAkJfgRBLlHvld2m6oT1bMxXb15I+UDRA3lKOlmkQNkvwuJ+A/t1AgcSGgs
bundle.jssha384-mNAspOd0SAUL40bAqurEAoch+Vq6IfI/BJ/m1XADTdXWHUNgqO7nuRpgNxb2KjDl
bundle.min.jssha384-GPiYhYWFv/ENAs5wt9t2TXRP+f6u8TlNbaLQXZj/ypaiPKYh6MdQ82kS2UqGo0Yl
bundle.replay.debug.min.jssha384-q5+r0Y2eMsq2AnXYjkSaMFZAdWqlqnBp2kv78E1KHz0vjzYyEcDbYluQzXUW7dtR
bundle.replay.jssha384-4hAgpxBDQAFm9a0pPG0ARGbqe5f0z/AWUjvPw+qOk/OKBtdq9u4A0FNdIEZ8m4GW
bundle.replay.min.jssha384-f15LHz5xcEeJrRZN36ru6WjQvh9OmOpgHh7U7A3ZH+X/Fn1c1y+5fLq2si/vBEfU
bundle.tracing.debug.min.jssha384-xkvlUtaFSCivzpqF1hsuJT5kkbvY6yfORKfMN/1tH0i3c4iGBTJj4RAYp4NCrBCD
bundle.tracing.es5.debug.min.jssha384-CN2JjyhLVvw5pifSmFPReNFt/tDisS5d530/7AfhcUuDJtNvdbvR0QxscmaiMA8M
bundle.tracing.es5.jssha384-51eGWa6s8Mf/uhd3tiEmMBwLUBZTX9IAfFQf/fbeRPLPdyDq9s2T6rscOA9uw2Wv
bundle.tracing.es5.min.jssha384-CIU7NKsxFYZSO23bO0MGqgD0EwPHZJC6XKubgX4NW6s+7qPn7LJZ3fYjPIA2dKkj
bundle.tracing.jssha384-7s0bKuBMlwuLRi2t4L67GVv1y7W8qFYmWEbqd/SDp1qreoB/OS6/2EpjK+DrLBUs
bundle.tracing.min.jssha384-AW7fAmtSljXVfwe7Dukjfbi0Qktn2FWEiYrH79/C6BrhJ6rePsHmThRaPUdTJxad
bundle.tracing.replay.debug.min.jssha384-Gy82UWZu4Ukz00ZyTidj3vpOSxYqNTzNnRt2BicKYlDjuwZ4C54CIwjWC1v9OTFw
bundle.tracing.replay.feedback.debug.min.jssha384-xPEXFVEZNPU8ADt41Y5nzg/xVWoL1PADGJoTJu7UWSemcdWjWFrNTRWvn3KiBkXc
bundle.tracing.replay.feedback.jssha384-/gkn+LA72QK7yoBMj0LEn4nd9N1XxDl2jW3EUppbrIFuaJDPbm+sfhgrT7VfjUYF
bundle.tracing.replay.feedback.min.jssha384-Iu9o25CSGl4VAbgNHf3jfOOtIMfcJ1M52cBpBVbShUDaz4a+sHU8CF0504NMRbKE
bundle.tracing.replay.jssha384-z12pBkPe89Jqi+MNNGRi59eRHbbk3/etC0lHd7RtwDK6BaKJS6RXADdJcDZQN/KR
bundle.tracing.replay.min.jssha384-g5zg7AkbsD31xiTleeMQMHhd4v3t+N5PsGU4vxlkD4YAoN33xKIMcM26+h2Zi8bE
captureconsole.debug.min.jssha384-VZ8jy9BaDHYaXofqO5C/tJbWSpjDagZwgOXas5OkCWDaiPkSf61MDj2N7hsoeUSU
captureconsole.es5.debug.min.jssha384-NK/xZMiSDC8iAeuFMSucsBDxHl8TwTckX11oSDMBJWohyVR8DrwvP9mG9cfF+1C/
captureconsole.es5.jssha384-KhAQZLTCA/H2pJRu1XoI4s8GIl5Zcp1pBhQoNGKvJtGkLnfEFeL3hqbZqR0Z8jN1
captureconsole.es5.min.jssha384-rAkYgCxL+Vkt4puKtQ0FnsaqpOyXtrPAUrfMx9xIoW40Lxq3I+7MNRONl60fJSTf
captureconsole.jssha384-FjAbFghbJI2fg0gzpDWp1pEyckLEFOOm6j2X9icxnKM3q6mEbhANP1V6JnEKjo1e
captureconsole.min.jssha384-jjP4LRF0KD9ObVOda9iXRwB8BCFWV4NWs2C55+H4n49RkSbe+BmMw5ikzQW+4WFI
contextlines.debug.min.jssha384-E5v6n7PcgLmEjMl+l9ssieu5E16SZdMu2e+XqtJsAKa0x0ZGLJ1hYz6NML+LObD0
contextlines.es5.debug.min.jssha384-B9sq9ZIk2M0oBkazfZrM7XRUlwUgNwE+eYqasRnPGFbK8yqZiLyv3CsJqz7E97jv
contextlines.es5.jssha384-h9iHZtX62D8VjxFay91MrC6G/NGvcgDWM+jRh84TsKQ249Mfkxi55ysKNht1xIQ2
contextlines.es5.min.jssha384-AVp/ebCLrLSIyI4SK3WN7vOEaDJTE9qKsYCGiHrB8Ia+K9WFGAShE/HpZzLOPAjc
contextlines.jssha384-M1ZTdg6HITW/OpMyjigpeuo6OFGSNo88ojQsLCPD6LYkrz/+6gOQyXHVg1QSUumi
contextlines.min.jssha384-c2M1mK6LrD1Hr+G3Q4L0quDLSa6fblnTNdG0HwF5KwjBJeVL4RFlqQdmdeeR4Q2M
debug-build.debug.min.jssha384-5ftDzHKHvaB1i9Nemo8Z9TQVyOq7FIgYoTzDm4m1+z1BHPGtPizhans1se0tsCkA
debug-build.es5.debug.min.jssha384-BqiCWn6sUJxs43JYMjt4XE9VwpUp+74j+nBbc4HDSNOP967CVQev4D/yqzGCw+8h
debug-build.es5.jssha384-47laQG0UdldBBEfySxy18mYu4uttPWXO54XaHPAQ7AFO3yU570FFvRWfqPyxJauB
debug-build.es5.min.jssha384-Li4cNLLJwB4N6Pk2NJxaF+eJd9OC9Qz+JXxJzFsLdk1psxVnUCvVdWCCu1K8cadi
debug-build.jssha384-yc+lMcYxl4lF+GTiVf6zwn4X45eeNxDf+nr1JsoLIfVJaIWYIwIYmKDExltv7+gJ
debug-build.min.jssha384-tp8mZSeTDMxgnderP6+ClLT2My6nxezz1JO9gN8y5LGlMURMx3aG+jYkgkp3gpCo
debug.debug.min.jssha384-wCZafovKuUfOPcG/0ZH9jURGUmR1qh6XmlSLkPMqWt43BLxGLyWy2IyJ5TI1cY0E
debug.es5.debug.min.jssha384-0n3KNjMEnmlYTYQxl+1VOcwFXVt5jYQB9wi3F0leSEcqKroK1iDQcd9Yr4Tml5jI
debug.es5.jssha384-aYmQksDWEO9aF4I6JKD2SxdDkFwReS5b2FVDTRxBmR9uPyB2xVQ/QIX3ui1UG8Ni
debug.es5.min.jssha384-LtiFXc9FjlDONxmGpIgP4gCjljZzx8x3b8yIhRx/DlmUCC35+Yhpr5clWLFtVOES
debug.jssha384-reeKJ9Bsa/ddooDdUfPqndvYELBXBE6Q95r6elwr/GgD4xB1Hey1Tbsa+AM/O1md
debug.min.jssha384-Ie0c+iFt34oS/PWaAyAEsuWvGyaJ4/O1+Ra/3qYX5a83FThtF8bdQTy3xuyh62L1
dedupe.debug.min.jssha384-xOWHrCUY4V8LeBviITNSQJCeM9HRRtzZLQauidBZnp/2+cLQGo8/7gvTEsr27ZT6
dedupe.es5.debug.min.jssha384-rvC5e1e+BQnYiSJOMsnbLu7r/5WijqaN1tP1X0Sqbz7/TTtU2d8S13yhm15S6LmU
dedupe.es5.jssha384-hb3hs4MG4gvRFiS4BM8rpHC0N9ekZ4Wptf7lzwcMzh1uklrpKxPkhpMEhWWxjwCi
dedupe.es5.min.jssha384-rRBnmMn94McRYkkkGNO49dX6wAdrUDFjfpfwnCxNYFjY8pgOPny9WiJ+2d9lgFzD
dedupe.jssha384-WV1mWG7a2rgqrhZnUp5HaW3i3BJ3aNHEg9X6CZxGyA8NwHzASpGVy7Lng0bFhaTT
dedupe.min.jssha384-IhqPGVlHpuu1vRIylZ0TXSWJ4Yu7z2ytRq5OM9lNyVV3mrncxMQ9kEhbrq063QiX
extraerrordata.debug.min.jssha384-runEfW3Tl9cPNBVq9EqmQb/hKRP84pcpdTAXke7PrB+SUmUv6Qs4/m9/LzKtBKeI
extraerrordata.es5.debug.min.jssha384-vwLeIcuingytfbLCAN+jFRP8QjjG/d8sZUBnonQ+TP2hUFUhyHmjdrTPwpGfSSBj
extraerrordata.es5.jssha384-MSE1YdRjP3C2lUZLPUgz1+TLLSkewELLL6jIUhgdYENG1GYigpgnCaOYVGbjb20y
extraerrordata.es5.min.jssha384-oX2DOB8OvRcN9VsNNYuvgL+/46+z7AB7h4KS2mCkX6wfrKT/5QrGynDOKH+k+yV1
extraerrordata.jssha384-VMH2b8UD2jLn1H0KYLQ9F+jai7ERvAWLG2Y16lc4f1yfqEnsA74M09OPEyrpcAMc
extraerrordata.min.jssha384-N0xJc9NUWwZVwIJIx4AwdytFzRUkXoSF/oMTB4lrna1rm9WpaxJyfNo20/YT8shQ
httpclient.debug.min.jssha384-wr72YnY54y4NADuy+sma+AVyMWwR0KCVXjxm9jpWnaqrcIlJiUrUlJOjxWwRpZ5U
httpclient.es5.debug.min.jssha384-6Hw33esqG2CLPcx+T645/Q0pTqOC3UqeLEbx7+iLf2PKLdQY14vK20iV1ExqfE8+
httpclient.es5.jssha384-S0l/lJefkYMi7y0f/Nx1kBWT14PT8cinzM9KFgaFcs7M6tWObCjWhr5B7ss5BUJe
httpclient.es5.min.jssha384-BG3Eh93hfg8umJjF6AlnQK1jtrqosQ5vtYR42CbLx77Ul+JnhrA93daIVQz0AEvm
httpclient.jssha384-jImBth9U1gn8ACuE5+fe57eZ/T/SJRMFQa9l6JwcaKdhtFEtufq/wsLfQW1F1uzv
httpclient.min.jssha384-4NgowsKM7M6zc8C6Ph578gx5qSjM4kyt62FLJqdKSXK6KVFaGPwyCiDjsFkCxyWJ
offline.debug.min.jssha384-NLj7WFR/oSPyd4FiryjZTvjsTwgIs16VoM3QDEVrkBAjeO7eFqS1RQ5dCBibci0b
offline.es5.debug.min.jssha384-i6uXp1W4UuBHv6lPG7rvGua+jEJQrjOXmup+Vg3s+q8DyV8NLL+S1GjA5uT/trTS
offline.es5.jssha384-TOkv3h0rYT+HxNttJ/2rLPW9DKEHoucDgsHgSjOzwoZfdgUrKoBGIyc+GwwhoKd1
offline.es5.min.jssha384-/Oo9MQHo6vrULMSEQxMzOSde/JTGALcb61GmXNRJIHE+2FAOjwOrx5b2nu8yyR3d
offline.jssha384-cJjSoowtjlmhOSByEoAAvEgLD2LF2MzBHx+/V64d0+mE5CHhTHr0eaJNpA97o2G+
offline.min.jssha384-JDdRgGvDHdjdswoaQ9fZQA9eiT4tuST8vCUI4qEjLmOEvG6CIItV53Ga5dldmu0t
replay-canvas.debug.min.jssha384-V+AP+bHrZ9INr6AjlS5+UkoHzAMwMUgbaEm1j+jAXMf978WAJSGTbTwVk3QN4S4T
replay-canvas.jssha384-Icuy6x2Nh+1gVYL3Meq5KnRZazkkXMkZ5SKOe8pJzLtV5QY5xREfM1DJDnL76Yf6
replay-canvas.min.jssha384-UXl65EWblWwwm6e51wbNy3Y1NbGlzA/f6kkQfmxCQXvoqe6IOp4N0ORu7pUeqFuj
replay.debug.min.jssha384-2ANUUvjBCOR9sJ08UBkQovbtNO8hYDTRPa45HXW4KcsVhNWp9r8Ixi0oDigh0TeU
replay.jssha384-x9xtYGizDp2zVIyJMZRldFOYbiwKWj08rC+HpMXpDLznF40lvPoR7KJOlrbVYKza
replay.min.jssha384-LqgBiP8SJ1t+pCalYg1i5YLbbctuEBLZTovQ5WN324RGKvqT6icPU72yGrylFyCa
reportingobserver.debug.min.jssha384-NXwEaFm/EvmXEJBcGg27/C2Mt+ub8VvpCoLP5QgLyjK7imb/hJTsxNbgZvxmlu6U
reportingobserver.es5.debug.min.jssha384-RnRMFPA6Yp74L/e3XWuWNg8VPZYE8stK4rFUQP9DgI77gVGcdkk259SvpVLb9M1g
reportingobserver.es5.jssha384-/dnB44F2xalj28IZ+fhG2Xc+7wZssmMTy3lk5VMp+l4vPepsC+lwK7rrWebg7h5R
reportingobserver.es5.min.jssha384-GlwuVrgPV9TgYcuv5tjwTdbJO/FI1/I42n4Eia7suHhwXPCSupPg6nphiVI3B89L
reportingobserver.jssha384-JJcu1l9DhpmXbOJnGKeYIeCw+z/2KNSyE+uoRrB3bWt+oD/Y0Y0V6StcNV8l2iOO
reportingobserver.min.jssha384-h14BUBciFML98ZQp978sqWQo5Ld1YkSg/AWvv5KbciI2dy1wsuN08lCZv5QqBttS
rewriteframes.debug.min.jssha384-Nf7eY2EPha8fQDvsdsnCzFi+UjRR14wjMOxkm7HzpIQM0SvPZK17ecTd8jPOn4ox
rewriteframes.es5.debug.min.jssha384-tg0ICXEkqRxdub12eqm6F6gPvPl8QNg0SwvTG9pisQ5+l4QDVBaeaTrWyNeg5Hfn
rewriteframes.es5.jssha384-ffkpcPEQneRUvH6nao0XEXY2kfkvXlRNqG9aT0UDI8GsYhJyswD8cXxEGh9TFHMh
rewriteframes.es5.min.jssha384-vlNUunh+UL+Hv2VypLgF7B9PbFkE1N9+VPia4RH9BpydRwTUmDcERueueKAzhhFx
rewriteframes.jssha384-QsNZx0kpfLb+7Dr+VB7ZcEH0HkWYRkKOspdjGwgprHncM8c6+G+vtNeoMP/2RZXo
rewriteframes.min.jssha384-IlJHhrM1drKi+khdRHJOkGMecy4DzqogB7vYt4ouT34FZqX3xU0bHMibyu/gBKEY
sessiontiming.debug.min.jssha384-fnAHVt+mpgjiNfvZlR0w8kqUEMd/HZ4OubByQOG06As5npFxLQeoHvXyhcjUrHnD
sessiontiming.es5.debug.min.jssha384-mm/7l9OYfyXZz9qcxFxcX9MDxFq7tzqbl6yAObTrYnVEkt/72F/cgU9Qv4dUf1rE
sessiontiming.es5.jssha384-X24PIRFtNJ1dBMRw28gyEhisMSQmQ0q3LblojK7umQ3Z9A2x+7SogRSzvmEQ9Oni
sessiontiming.es5.min.jssha384-xtt4FneGxV/Ieh57MTzpx4STbYIQ47PykWZ8IaAiJis1RdHjwTPMS2noh+m2uwD8
sessiontiming.jssha384-1fiTMlnGO6JcE9raQLcrk9+uuVBnd19aoCkkV9aKKYOC7772bMoV18K0QkH6VhVf
sessiontiming.min.jssha384-zcTvjaeAPFEyXWxXDmxbn8FjAVUyIgbN4Bl7V0h0PVJVNH8mfnpOiMfkVaVcW00N
transaction.debug.min.jssha384-TGRpO1R468fV0muXqiQd/hHNsMEFPLqpNoqh4c2FI79tthvcTkAdbdv/qnDXJWGs
transaction.es5.debug.min.jssha384-pU9LqvQM2ibtbHzUfzLSRW1/nWhJDoEbVUL3rbJKliIBuOoIEEweO45n70JZiBlW
transaction.es5.jssha384-gHgQnsWyyEJ6pmrsIQIQKjUfomXG6Y1XW98MHFYlpJDd3YjfOYZsg7b5b/sQj47/
transaction.es5.min.jssha384-E6kwzZ/FGa3wxXR7ltp29umgC7RtC4MgEmBntTo3QLaEbwVN/ONdtjVqIpXXi7qr
transaction.jssha384-g2eYXn60aj5hL4qCIDAGCvGh2gmMmh516lyZps5MdnyiirqM+fDJAzGIXkVwL0PK
transaction.min.jssha384-hQFDf5tmDpfn2wGgF4y/smUzd2S5rskVmyfjR839u+gIbZbdh619u3od7iRddSLr

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