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.107.0/bundle.tracing.min.js"
  integrity="sha384-2j4R0HGSkskmYjoRkEoO7jxRjvOWIDeXR1shsKjzV5k9crIR2BgbUCHnPGrs0SNp"
  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.107.0/bundle.tracing.replay.min.js"
  integrity="sha384-gDZBaTe25tDfJANz3dMa5g2GwiSxs8mDw+J75zW777u8Chz28eR0NOQ8e7YQNNDC"
  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.107.0/bundle.replay.min.js"
  integrity="sha384-bOQunAjIpCgWbdqP2VE36drl/SKjt1DBVogWzQlNzuM0Lt/nvFfuIbD9Zr6o57vx"
  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.107.0/bundle.min.js"
  integrity="sha384-5fRjnmIzZZSOe+YOwI0+zJu2UduHirEk+d+KAsS6TQbWXOGaNDGaOCKBCr34yCrB"
  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-Sdb5fn/y4tgFhUCHN5WN/QR6W5q+3JOYvKNDV74Ss+pHTLn27flxSIofHELamt8r
bundle.es5.debug.min.jssha384-Rd4Go9NjpyiBwlgpaIRquTbW+nang9rA4nNlkJPlRuO/4Qyb9OeztWpyvFWM1/u2
bundle.es5.jssha384-lZCyf6b/wybwENmqtEwm7WObtSeTLWgzlp5Qi9CGqjJIs/q4W7ID8eTNNAUjJ5MI
bundle.es5.min.jssha384-RD3gODUW2KRYLJMeE+lNfFOpb9KkF3SUtbWxP3bSYeWbsM5jCQwO9yJpc+NCL0oP
bundle.feedback.debug.min.jssha384-SwhdwsntCJIRfKKfLEyFeRTc/JBWLDQ1GGa7d1rvXUDQoxHN6HLC1ufKx5dVjSul
bundle.feedback.jssha384-w1fXj0ejQiWgqZ4hjf7clCUf+kMU4vwLq1rIDObGpXh634qGzM71YXW3liddI7il
bundle.feedback.min.jssha384-pc6EB5m3XdjiOeAT4vEXpoC7zBsbwZnoMpA+SOF0mahRTQzHAmD3Q6rpWM9ZTQrs
bundle.jssha384-7S2jD+oU4kCL4GLyY7XiN+5BnLH/saN4km6Fi+FHX9hL99lS02WOhRgcREMK7/N1
bundle.min.jssha384-5fRjnmIzZZSOe+YOwI0+zJu2UduHirEk+d+KAsS6TQbWXOGaNDGaOCKBCr34yCrB
bundle.replay.debug.min.jssha384-NBi1LY9K6KLHd7ybkhdi8E272wDGFnrO13uern62Xzhqiknjf+07vthNTUNyg3t/
bundle.replay.jssha384-n4BrdBhSVmjBAgTM12cqdMWAbxfquReCo+lse5fmYdkYGWESP8CunO4vLXL+UjFh
bundle.replay.min.jssha384-bOQunAjIpCgWbdqP2VE36drl/SKjt1DBVogWzQlNzuM0Lt/nvFfuIbD9Zr6o57vx
bundle.tracing.debug.min.jssha384-gf5dNHzfQ0ylkBcJdWyeDjzybzFUSwCPE5Yd7xndDaFA+N0Qe4dJQwoRn7jKEUxL
bundle.tracing.es5.debug.min.jssha384-NUsneKiNCJ2ff/agxCa7E4ykbAKDmAOyYYUkQ3SYpEgYDO55gEAEFSwuaZtemsa0
bundle.tracing.es5.jssha384-E4GX+PU0yV9rP+CnhZiMcsKapxVZ42TeGzQSqIXtsRQcoleBnERegcR+DtKDAhQE
bundle.tracing.es5.min.jssha384-czpnDEIhdeV6Saqkr7CeO7okatn5Dipc4gDYr2Mhjtzy6SYZPFtCfG6ZFO5vd6pv
bundle.tracing.jssha384-Fn+WOnk1w1y51jft0nS9J0+QBDbdG1Eu5VR+n8Mc20f60CEsxyFVfGo2TKvP2nPK
bundle.tracing.min.jssha384-2j4R0HGSkskmYjoRkEoO7jxRjvOWIDeXR1shsKjzV5k9crIR2BgbUCHnPGrs0SNp
bundle.tracing.replay.debug.min.jssha384-oCVLRFolaEUvIdQjTBZhHxNzW27d9jJut0F2I7jNHvl/yL9d2Vrz5t1HjpIDxIDg
bundle.tracing.replay.feedback.debug.min.jssha384-M4OSGV3lj8WIc35aRO5TUvR7nq+6Q/eXuST/yU2g1OQ4K3rUjXtYwRQ5H8oWmrM0
bundle.tracing.replay.feedback.jssha384-Cj3wTQSc4GANlpEkCmOGoaVCY3sD8+aZCZCUhEmx/li1Sers/8COY1z0G4kiQ72p
bundle.tracing.replay.feedback.min.jssha384-H6FbnZIOcKmFV89f6mKXLz25b6iQTJI7TYp0HiXgt0BKFQKpFMyu96eKNzTJDbYL
bundle.tracing.replay.jssha384-H/gr9CvHAd+2zdIYY5hYYwwgwxoIbdoT4MLwIeYeLejP5k/BNAbVqdBT/8c1PsSm
bundle.tracing.replay.min.jssha384-gDZBaTe25tDfJANz3dMa5g2GwiSxs8mDw+J75zW777u8Chz28eR0NOQ8e7YQNNDC
captureconsole.debug.min.jssha384-e1ymQJ7X57nG8p62C7r9OPxoAHIX8uxlSx94LTYXxaReMxOX8ixEYeRryad5IZpT
captureconsole.es5.debug.min.jssha384-fYThSnoDhxJmsGbPL69TsC4+v8obYxm/6DW3Ui9XVJhGg+21ECkwd8oPkDDgX8BE
captureconsole.es5.jssha384-lLuzFKof+Z/+JTIbflBqSTxUd+hj6+ubNC9EUq52Me0y1ykrFAyhhz7N3gPxmOxX
captureconsole.es5.min.jssha384-3LFcFHtSK5E82NSlAMVgCR9AsY4tHkLGEZy1kCCMyQX5T+F6T0/qJd0PHVDsyFX4
captureconsole.jssha384-bNXxUu0cajTISeg2mEOfF56sEP78kqoidz+NhilRace2ahLDFR0NVqOpZ7EfpUx/
captureconsole.min.jssha384-wxC2YIrkmg/HB2jUTGg4F08ZhkWStBgVgAkAOdYM+Q4WBwr4mE+DnIRiDZmwdZJ1
contextlines.debug.min.jssha384-RangwF4M9BsYK2pt+/DAvofNf2ih43vDCCGHRMAa1e/JX82zG2AigOCc8RquOC23
contextlines.es5.debug.min.jssha384-IpM1qKF7plnawEFvxO7/rMH0TEIT6bYsT3KdrBcRoGNTnHT0YfTaCp2lO0nRkISN
contextlines.es5.jssha384-hecvI4Q36tK3yt8qF2vd/EGocIOofvIzytVUIZibeT1jExjP2yGPbcGKWL0SNRfa
contextlines.es5.min.jssha384-aLb7+nJP8P5AzFTBisEXYr3Hefg7LpMO2dNCLi353rowXdPkDQwzf1ubgBXsIHEF
contextlines.jssha384-Y/rNyLNJxa9Wf4Xnhpg/ML9Pes6kPCI2rNHeQyxaLJQhfcEJJs1MGQ+5C07WR4QK
contextlines.min.jssha384-rcHf/ozw/7tPzR8OQb1/j7MIRWwb7onLyAvSdTt2LZ1rKYhBMpxWtO/dP0wlKXxI
debug-build.debug.min.jssha384-jWaIHlOg6ZNi9It2MpUt02Nu9FwKSR3iQlbCn7ZHdbsUb5KsBe3fWQ85NI+XE1wg
debug-build.es5.debug.min.jssha384-rlMU9Ap0rl4hoBZFpaH1EX+sPPGlR8oxj3FrAxfPFEdzfjSGz5ynYKcJQCf4zvGO
debug-build.es5.jssha384-/MJ7MJlyexrTZuIKHqDrqsGltaGehpOMjsoyRuAQzof9v6zsGCgTs8t3GuBhnrSW
debug-build.es5.min.jssha384-Ls0Rk30tGTutfo99iRcglYmljZYqgHKVMaUeAYcMxPaoFfS4wZuiutDBRsETEH2R
debug-build.jssha384-K5bzxqb+HmqQhKJqHphh1aWZBEuQzOqV4w/SY+tlpG4KqPvVEPqZYM59B3ZaBvha
debug-build.min.jssha384-THvkoxybBETuHrFUY1+M4IkB1dyEkKHX+E1Xp+LPZSYHLigY95iiRjNmg9f3lM1q
debug.debug.min.jssha384-X/NIbnY8ITeprz6UzMkmRZplpb307j+uQymTwTsjpnmNfl8a6li5ZOR72EdvhdI5
debug.es5.debug.min.jssha384-n5V+VG2QSXPq6xhT/QVIK3pD2FafPBnkf1qCp2z+weoreTFHHwa4jdvdJlLJsuy/
debug.es5.jssha384-qAxajdJW2zfGYSAGOMY2gcw2xiY1/L1DxPEkRdFFVk8DAToolRePvkjQyo/AnbPv
debug.es5.min.jssha384-STG7fGZ2ZmGLD3qvTM28kUitDv0FgBBzlZkJd5G3TTZy9CWHQroHBVS36iFxxh2b
debug.jssha384-dNUIdSWe5wt0Fxzshre0Qv7ebxOzdfVimWzrkO/E2K69O9Y0/zxMwCgJ89bbx2ly
debug.min.jssha384-adlKx3/1zQx7K70NlIjkq0iKOYw6QqHebX4N/dTtLuUmFigOvVM4ezGwWAFuwh8m
dedupe.debug.min.jssha384-b2AYnKlM2m/BJKMpuMDqBDbQ/PzUO05YRoW84xH3br9q7V2N3fJHpyH1gbvDKGb0
dedupe.es5.debug.min.jssha384-/ztTPYMhbaoizv094seJ1BdvAI1DN2OFPhSeWvaHhqHpQMlBG27HAwLBbjx1haJj
dedupe.es5.jssha384-sF4UvVNSCZ41h++jxgpfpXqyA1yoXsrrrm+N7BKJw/yGguvvfvsTAo7y0x0Sgaw5
dedupe.es5.min.jssha384-5z21CXhiz9rLSCtkOZaW/QT4xSDyL5XpGX1WnssV08pptzDPyoNU6Y0akiEAgvEF
dedupe.jssha384-ZfvMD+bzBBFG9X6b7yfwW29Cx8DiSfRbGGbgKCUAylgvH/uUb0Fz/IMrZeoGOwEI
dedupe.min.jssha384-TGUYbe7+C8nQSgIIlPC9M3X11fpaIPzJQ7kVm4Fo2Y94n14npctjX53wLpKW9yoW
extraerrordata.debug.min.jssha384-/YWzYVzFKRYTDGESyYF0FXrhDOz7KARsVzKQAaE2W/B2/Ecb7IwKbJ6b8ce7poJF
extraerrordata.es5.debug.min.jssha384-XtnQugHf1Edx+jtT7ApElxX1gzGLtCPM6VtPDW+pZa6kJ2uLhE+QYN0gQu+z0bCb
extraerrordata.es5.jssha384-R1uMTXsj/+Y9kJi1xdsXosTl5fh30IwNWxqgdsJoDIPFgBCQwy/kD+GO2o60TH8x
extraerrordata.es5.min.jssha384-FubqdJXfI4MiD+px/02HDp4EEyH5Qo54RVS2HB2e6WRTViodFXkvoBH7ZhrFV+eO
extraerrordata.jssha384-ldXn5t9cELfKNaV7fXwauO+HQFaHIoN3kIoF3jY5oYI33kKJ6Z4MMIHsNc7HMYXe
extraerrordata.min.jssha384-ZoW/+boS2JTIt2MU0RLSYLqUkIzxQk4MiOQN2RXnk0kkfay7R3BzpR0+fEaP5v6q
httpclient.debug.min.jssha384-R8cq6DWCtiQ7sPRFM5ZcfA56o9IfChLBbJ6gY7Jv7mrzMthe+LXecHIeWI5JPFhG
httpclient.es5.debug.min.jssha384-r+4IAEylUd8rKIHZFIgWBRB0CHHUkYIWi12uB/JtPzeAUxP7XmYeMqzNJPxhx9Is
httpclient.es5.jssha384-sFy4jTH85PElwLuk3caWzPjpzi7nB0qh6hfY3ltNUCAg0As4kRHRV6s9vt+Or2Un
httpclient.es5.min.jssha384-9ivww3AjV0yJudoFV4ymtS0X/XTeHXEeKA39VopKSPCcFfK//3vpyvTPc5ylQ4M4
httpclient.jssha384-YanqaeG1F9GmQeSkNmC9Jdsjzsg4p+FONsBQjhauqfXAAqYxS5stN+iu//eVmp1z
httpclient.min.jssha384-azIQEnwL2WJyH+6m0uBi7ioBDeUBFCnO7GLWG8pwxXbUtiZsa2EyWwYrcfBZcifF
offline.debug.min.jssha384-ghpv6qg2FzFe0wHrCq0CqkfK8AWrN5IFdm0dhaWlpm85ZRbGeF/52RBCWMUv2vT+
offline.es5.debug.min.jssha384-q83ccHFJ51Umd4tPU+pS+veopvrptdGr/3flXH4o4PnLCDl+gVhUk5WcLxmKrWky
offline.es5.jssha384-LKWVMmHdlJ6G58f+OZF4qEASPNCX4AuXuVy/JIMVx1SSfbcMGgLBi8TDiDhSXYeJ
offline.es5.min.jssha384-EgDRhx47GtPghQGuk/06otWxfciTxqJvj3bcm4tXCLQ9J5OM6Q71w83GYszJ3qTR
offline.jssha384-9Zr+XKf1AmvcIiKcnZ9mhiHSECS2SjlJEOD+u/mJXmv7mkslqxGbt2S/s2RAXMTl
offline.min.jssha384-K0JAgkE6pqqv/tUNA4L5OiRZiE6MHfoFtePa/VkrwKheqp/TvAt9J2CDaadVcxH+
replay-canvas.debug.min.jssha384-e4rXDxv2sTCZ9AZwPiRTFjqGTxG4llAnVwEg+x7w+Qf9ZJ+l4XNyxG2z/1IdWiTZ
replay-canvas.jssha384-nM5OvBHl4B+caeeTR/HQGevHuvfcc0vQBZhMNGNHieFRrrmyjAlBS7jt0SVQQmVr
replay-canvas.min.jssha384-A/VYlRE3XoGBqlXlhDlBhOKnQ7YWwvs6nyxEt2Z6FFqtnnTS35V5KoA6u1QnREv4
replay.debug.min.jssha384-j6IBRQkfF/uUVT0rwwgv5tED7GRCL/VKmRFTikABaCEHL04HXzXyUldMhXE8y6nZ
replay.jssha384-AamYr3YsRpK1ZeaN6iju3H5/2JDrGjDFDlaz0gVqJ9jsGBGQiw74S9qVSAS9pcx+
replay.min.jssha384-zAi2DYiALqEBU00oJ3OhDQM5mtgVUO54r17MjZwX2H2AyMUUjod70eecE9CUrsFx
reportingobserver.debug.min.jssha384-9cD1BCDWeyG8MRQ3dslpTCew6CIATPYbIYv1eSBpegc2E/WjBI84F799k3KI93vr
reportingobserver.es5.debug.min.jssha384-vWfzpqR5zhdjiA8ooy+KtlT3c/271RrfzyCjV/8hFcyyCnRi2f5nRjHPUXsAYoHm
reportingobserver.es5.jssha384-amHjMMauWygi0HdUmTsSHDnlROpy3ZDMl+BcCePF+Q8CmLjwfCTE9NT77Hs2lz04
reportingobserver.es5.min.jssha384-vIMCHwus8rNJwpC0eQFCd105QB/m+QFctTPjMpyIDZBzjAYgJl74Px/z67EcmH2K
reportingobserver.jssha384-h7f5M8L7Of8KQy242JDrwgrIXCszdG4bBoRunUajqScdWL6oVT+OCeyQRI15RLir
reportingobserver.min.jssha384-BV4zarLnSo2UwtPToLA268fExJD1vlbahsQdVOP5bLk/5x34/pnG5v0ZykBrmMv9
rewriteframes.debug.min.jssha384-/WEp5d5GIMjlNv0ItoEsPJx2umgN4qtMUeGZ0+qj20H8axZGulwejWknwcQ0rZi0
rewriteframes.es5.debug.min.jssha384-itIz/M2tSZv6gWTL9ngBSToPQRvyvfiqwpdQYSnyOrpsIB2ld9Sbjp/as2NF3ZAh
rewriteframes.es5.jssha384-uKjrNgBYxKqnAGsIPkhDrnH7eEUoNudd/oMY2oaHq4okSAAE4zwHz93HYp4uY7MN
rewriteframes.es5.min.jssha384-d/h2N8pTfLc/Y9qrRt3ZIYkETO8GAFRoIRZT36b4cHAlaY8PUi+gTJXADmThyLm8
rewriteframes.jssha384-15I3+LaTMB4a94U5KAMn0dykp+hvihLcAY1wQFOk6Eq2LDe0+GapAH1SZZ0fA4sM
rewriteframes.min.jssha384-cn00eSo0ArFVeKZyqMTKPSzNBYEGZjKHhnNgqTXipptm74p7bIp5SNtv+SvpXqSy
sessiontiming.debug.min.jssha384-DVtULz6fpfE3CREjhzg0TGJVxXXSjtLocaE18XHmHRofWgIUcAbcMDtCp3FPIJPQ
sessiontiming.es5.debug.min.jssha384-sHpw77WxOMDEecQIUUwi/pRzWu+6p4TeO/7zSfNAyLAFF0kV5n5f621+6ByRsmKw
sessiontiming.es5.jssha384-TBT8bGr2quG63ZzN+PnqFWnAgz9jYbdm0D+9R12otEfUGX+BTE+hjvUPkHsGogC9
sessiontiming.es5.min.jssha384-WV9cWGaigGJTyWIk3mutHsK+ypnIns77sswMfXMmcoJlOcVLqkD6KHuafcDWovlT
sessiontiming.jssha384-XSku67NKj5TKN57quYDrL1mJshl1q3OKhIWVgO1Bmsz19egj4y1LLPfLoJoXo/cU
sessiontiming.min.jssha384-ki0DUVUfQ5L6d7J/dNTO6yEKla3eZ8blrPyJtRN/mfuuP6k3itKmYUKuo2Lmd0O5
transaction.debug.min.jssha384-HdHJZh6kN94dvtVdACraA9BBVCjHwmFrfn2oLQ+6r5Ds9XewW8YhTIv1H9mcb7nl
transaction.es5.debug.min.jssha384-hOPCGfysj6QN7mOHgkHolv4enB7Cj3bawZS8NYgi605nQXdLGTptaTZYI1v+50+S
transaction.es5.jssha384-Q4KdozXR70yigQm2W3Go80H7IJ4+mKYkorazj3iPSyG5uYcfc8eIz6bUsL/m9Cn0
transaction.es5.min.jssha384-kDkwIUmG/uix9lLqP7mzCgJcIg92s7RUMECLbcYXl7Cml4pvTl7wnvw5o5gBCnR7
transaction.jssha384-PX0bw6iFiISdOXaabOIfnLagFtcgVIq3kXQWyKH85jWYSQjFLb0zF0PG3wC/Zswg
transaction.min.jssha384-4rFARbcmnqtN5NtScUza4Xf2hcb/Arh0CHC09rmFmSu9ck/qirb0kU44tYg1IKxu

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