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) > 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.99.0/bundle.tracing.min.js"
  integrity="sha384-99tnmieVgWXT2BprlMVVbNCeKOFoMo/QxtacuHrPmcGNvTkcUylAofrsDfCFOsxB"
  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.99.0/bundle.tracing.replay.min.js"
  integrity="sha384-wqlpBXUjcTg5WFfGD7055DNLvBwau5/9WVdz8j1/qvbZ1qHQk08VChEbB9kZs+Oe"
  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.99.0/bundle.replay.min.js"
  integrity="sha384-80KaLMqz74qWNEhtOtXx3D+QasCOtau5uaKAlkY3Cjl18zAsRjeNbfGsb3313fp3"
  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.99.0/bundle.min.js"
  integrity="sha384-KhWx6ggiGYQEFvq5iRp7UFjJ9dQcTepbcWs3UTfB6Kyg7E6A6HUmc6KOt808Y3yh"
  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-9Z3fsBE+ONlf2J9BxKonOi+075IVvBGMYxnTqOgwzQ2lWhlg4OneE3e45uwCKFvf
bundle.es5.debug.min.jssha384-DUpMf9h/HxhWhSFjbDthswP6KSEL871BuqqeIo9B/LyHVtEY/OsrkWSbJf8M7QDR
bundle.es5.jssha384-m8MTdWJHgGccl8kWPIOVxGQwAyxAAXmxRLy0LCRV27CJjbtuscGEC8Hvqt2lG8aK
bundle.es5.min.jssha384-JV4iEMkRqUQyD4HkVG+8v+k+sVqNZ4MTpieca/E64UKwMuJSFW6WFOd6bI3KbbAG
bundle.feedback.debug.min.jssha384-+Dcm/HDJRCb222cfNmSaPQEwPSMQEwKzFBxkSp+SF14IaA1LMEoXojxWaea5Hnvv
bundle.feedback.jssha384-Lm4fGwbdaS/i5FRj0OXsnZvZI1bxJgF4w2b/9gXGtxk5d3mfCF8e06Acg2DPoV1G
bundle.feedback.min.jssha384-bOB1Z1RiSdEBNw0uZ1hqx8Pv8pkL3DztoVb5Mp6ysdbJ7h3cllKrC6z4b4EHE6IR
bundle.jssha384-pS67MFII0Fb/gW6g9i81d08IYkJtOhsCViQWP49ISJ/NAgdEwTwB7Y7Xgm4tRsoI
bundle.min.jssha384-KhWx6ggiGYQEFvq5iRp7UFjJ9dQcTepbcWs3UTfB6Kyg7E6A6HUmc6KOt808Y3yh
bundle.replay.debug.min.jssha384-ZhszBk/1UXC/gUi92W1qK0ySsafB7ahoHlgBzS69v//8vT9oNtzq9wnf1/AUuhUn
bundle.replay.jssha384-AfJd+jpeZcoggCMlpklrFaY8F+xqjID+TZi9JYHxdOi88jRU53H3rhtwX7SbkFtA
bundle.replay.min.jssha384-80KaLMqz74qWNEhtOtXx3D+QasCOtau5uaKAlkY3Cjl18zAsRjeNbfGsb3313fp3
bundle.tracing.debug.min.jssha384-HDLNfxQi+nw54fPfsyAxdgniOrKiJyShr1ZLNdVUWUaWI6UqaSfrFTPuNMGGCCq/
bundle.tracing.es5.debug.min.jssha384-BJnZcuuXUJkG4HnT13j0jRDhcH3Z3RkZ5YL16xk4GYS4KqjGlgpB//nLssVECYbT
bundle.tracing.es5.jssha384-0CGBRzdyDOEcCDWca+wWAmxIJe0Dx3A+Lsqxlnc2u20HLf6YAesEOluMV2QGsIVH
bundle.tracing.es5.min.jssha384-/baVgFVH2PDdOsfpOULZ1sEjNRwCnlSS5v1IPZqwlybht6U6SgzqUDuwt3w5jehy
bundle.tracing.jssha384-c8ifHkBHaJhTWcBg6d+shssZsjJQymVvhczLmuZazmTovG3u8/K4ZmB1LKv9QtTr
bundle.tracing.min.jssha384-99tnmieVgWXT2BprlMVVbNCeKOFoMo/QxtacuHrPmcGNvTkcUylAofrsDfCFOsxB
bundle.tracing.replay.debug.min.jssha384-q+tQJOGGuLJbT5jYz1ZFRKXkoko7Zda5ppYeCl9cYsLc4fnslNWpBEQajuW7+IDa
bundle.tracing.replay.feedback.debug.min.jssha384-QlqbpIhUdDjIAzCmDmX/QO/50Kb5iq76Px+OsVQIptzqDGRUq268EbPAaNN1UV8Y
bundle.tracing.replay.feedback.jssha384-vtHpdiNPZ4u/bsUouYkAbo6wWxpmfj+0q5F6V61QVrU0yOZqK57dTRtecCWPebnm
bundle.tracing.replay.feedback.min.jssha384-KRfhKt21vdvBfulNazVhzyNnCs0hf8Z3+kdsiJlf/S7R46QCBgy3YYBlY8vqCGp6
bundle.tracing.replay.jssha384-Pm6dslsqR8je1ZHQTcjsxBm1pGMd3XQTQGqnGJjyCWQL7dHgmOr1RgRzwE5S8rkY
bundle.tracing.replay.min.jssha384-wqlpBXUjcTg5WFfGD7055DNLvBwau5/9WVdz8j1/qvbZ1qHQk08VChEbB9kZs+Oe
captureconsole.debug.min.jssha384-54i8/kgoX6NMk20U01KmrBz/tbPDBoejf310ICqeEoK2RAtQMoNsVGRuzy5L7pXz
captureconsole.es5.debug.min.jssha384-HPYZ1J62eYuRYUuswaBCMj1vf/QSgJqjsIJ0Tr3ITrX4Rd6xysnmSKjU7Yf0jbiV
captureconsole.es5.jssha384-C2769n3Pb8zbXI3eWYgcb1oKU7geFSr0L4S0ghQKe2+oUgv8Cz5GnEjDwINJ1yya
captureconsole.es5.min.jssha384-JDmbHMZWz4YqvdqdfrXqjsBxnKFgB9Vr8eEVZ5jTiJvmjZ2xI0u1ZsMTw24nfPj8
captureconsole.jssha384-miTjyIbd6HvmAs8i51nCkMkP4aayJnpXxDbbuRlVxmPPCTTNrEqAZYDz0Z+gZU2E
captureconsole.min.jssha384-bNpWxBE3RpvoliQwXXOfoN99vElfVl/MLWusbR4yhYcuzbUS6GUm50x40FTLme0c
contextlines.debug.min.jssha384-4xevNgPWD5jm6HLSTUQqBe5lVkve1rQDXvBj0fE6Mh15gG2MNP4ypLlr7gDzPr6o
contextlines.es5.debug.min.jssha384-RKVpCQ8qGRrnvd3rsDbIrisq8Bt3ea4dph+e6Nf90MLEwcviactE5cJIosnRRKN/
contextlines.es5.jssha384-d3LEwM55uABlm8IQfyEuNbo87Tni60KAXBe0n9gEW9YMsg6t8I3BoBQj1S3dflXC
contextlines.es5.min.jssha384-yhblM5W5NPXeE0VYrbdK/3uPeAgkjcBKsa66ywscGAWhJ53/ODVZNktSzBT/Jqfk
contextlines.jssha384-0A6gBRIP5VyUs6e8ZFa8fHnOiGoY/AR6W3q07X/SbVyOUi59TL161VTn5bKsaKEc
contextlines.min.jssha384-jLKVp3JcjFew2c36cVE4sTG2sFoPZah/tsd7Z0907YVpTCTSxBDVA5hYCO/VGCW7
debug-build.debug.min.jssha384-wKg/0arYny1prSqlkCvGe05KK9ce4bqwxFNp1kgG0rhGjjaxLpJwyr8RsRQOGfGm
debug-build.es5.debug.min.jssha384-v7x1LqIkaN/efRt7EUbOxystrgNbNyHB2v8u2mH4cA5zsL3JnRWwBQ3HndvpB0jK
debug-build.es5.jssha384-CZAO8klce7vV7+QbzsJMO201he7oeN0RrHj0P3qH29fJ+MG+GoqWNH7dB/Hy2tIN
debug-build.es5.min.jssha384-c6J2ChbtVW/jUvFRcGormUTEocfFyCT3YyJUFCM3ZddLoX53P7L0Sl0T0ot7blOH
debug-build.jssha384-F3Fz7F+SlJTb9rtf+MTQvrqKcWQRv3KyT/TKnB8VbfwjgoAma6+QXAi8hvF+JGBL
debug-build.min.jssha384-+3THAMrjff/+yjFmd6WZwuvqb/Cqus6F1/UtOpoe0rh8MW8yOQ01s5wy/SH2HrRg
debug.debug.min.jssha384-h7nXXn4mUy06HnJN2cnaYV/K5SbMJuV5EXCXspKnOteCde7aQvv3D7qec7imREhZ
debug.es5.debug.min.jssha384-OA5bWo3q0WVtSe8hpmEOerdl1RDpJVJG4dQsCrXedEXN1Y6kDApOx1ABBWVJCMjR
debug.es5.jssha384-3fU9Qu8FumRPqJ+2d/4GgzHpGxFh/mFSDsceDyRQT+UTGwVy3VMjeYVlV7Fi8wFa
debug.es5.min.jssha384-TZgd9x5xhSq6r8b9RfZkrDBJFZ4XFqiuhjw5fSIVWgTwHxXcqhIJmN3u19UaQeEz
debug.jssha384-5oQ83SMx3lcDkOQ0M0HPwChOA9ieTS6kAnMNywf/0MfslX7ndKRhsu1uQJcH28JV
debug.min.jssha384-XhUYckRU/bgK6wzJw6bfp2xclF9hCeBomwxtI97cZF9VJrWMu5qQLmUNAPT/Uhkd
dedupe.debug.min.jssha384-DL75lEDLjRvy5sJi7aPF/zlnsyRPMXOkhTN+D9GG4VntzpcJdplLZLvbvsJ5HcUo
dedupe.es5.debug.min.jssha384-tNP+Njn1dzGEQPNSqdZ6GIazDna2ZdpSymeFFOy8gSawAVPU68FO2GF8Sxl6B/NE
dedupe.es5.jssha384-x9jxd0lE2Z80kdIRyKqgIurLCG7s9hV9RwIjgbj80407k1uBJXLkoxa6/l1MHmoE
dedupe.es5.min.jssha384-6mP4lyHpl9AvqNVsHQxJe0Z3U+atMhJ3zsdLU7CDn2P1oKF0q0rUEPKOL152IKv8
dedupe.jssha384-QpkdBvAwCAtSIgZ6m7e9E5dc3dw9i37hbXkG+U7mdavaogZwayt1VfNBUK9E0Imu
dedupe.min.jssha384-CJwyMf1xL1I3yYCLUuEmvXDvGfg0kTrrf0uM2OVBlHhNeXyM54vRons9wuqJrylB
extraerrordata.debug.min.jssha384-rPgMlEFbwwgE+WlE+qhCVIstvNjJquYVghwrUZbcTYzBU6cTJNWm2T+oiRXTmTj7
extraerrordata.es5.debug.min.jssha384-+Kt14eFONze/s1X7cpuGW5dwFIenhznj9U5JH9fMak94DalYWqaW3IjXH/9s7juF
extraerrordata.es5.jssha384-9kxQleObxBFHlEqVox2QyaFMbA4mXZcuAgWgDB1MtWsLy9xI2fyQjeQVZe9COHGS
extraerrordata.es5.min.jssha384-pQavQeXj8TZqKNGHI3oHS/Bo6y3TuCZxGfa2yrduRnlbeY5jzxY2x2eYVKfJOsEG
extraerrordata.jssha384-gaCY2BQtXQv/8yOffaXia+Qt88J3Xadu3/x5RP7tC18mAjY8EJa8b6YynJWB8xE6
extraerrordata.min.jssha384-pIR+QQfRaMDfjOUR570M9RgGlAUeGiPm/DXGfXZMMh+TbH/zYspoen70m0NoxSVX
httpclient.debug.min.jssha384-fSgxl5caCd/A/btes7WhTjckqorrYJmJk3AuCkIWFmb80zQDV4CkkCD4w+JCrGoF
httpclient.es5.debug.min.jssha384-gOulpNVbyT/cjLhypVb+QD0LfM3Lto2od5NNvl52S38iSX2oRFQNmC1njVOH08F9
httpclient.es5.jssha384-3i5yoXKQCU6cCkIp7EdenkMKjmN27qmnI2KYqIy2fbpGqeGcuws+H/9Vgr2DNE8u
httpclient.es5.min.jssha384-osmdHwowJ6rVoS2T+CYypVT/+NSP+x24gheKIFufrTVSk17hHtN9P+zjhk44VayC
httpclient.jssha384-5hO89g5NyACEpjN/tKEucwlgzSO9PeegYzTjtQV7f3Fkx0gmleHSBE3/rr2yq9sP
httpclient.min.jssha384-kq1pQnrv2pLd1sH7HQ0hEy7KWTUUHx61rBd6Q0vfZd31XCGDjjsW+kS9TZeQqdWR
offline.debug.min.jssha384-aGQca9Z8LzAzNjh0rN0XNWs2XWmCj5FxQfywXfDq52ekkl15mQ/FLr1OAi0X8L6W
offline.es5.debug.min.jssha384-z+M3y1oFri5omCO6Ss0qAZVtoJfo6Me/CE7ZLmmXpB4PQIzqB9SSjRBAKEekGx+t
offline.es5.jssha384-OaStbdaVh8t05EQYBjgHaQDNZndrlAyGRF1nrUm7qP6yNgEigfBcel5mT1Cw/27T
offline.es5.min.jssha384-HrrvKETccJITDOxe4AtPyF9DbRJm0B3Gdnka/79BLLxZkAVZdPcJGZR4pYFa7ak5
offline.jssha384-5nAvMOx334ypgQOVkJzqMjjURnnp6Jx5SxKXDUzndHW0zTB5E5jU4IghAGP4W+C9
offline.min.jssha384-PoC3Z3qjyXl+yjA3k6hY8pVd7/EpKLNHY1dYmmZbZObcGg4e0k9BOuK5lHRlaJkz
replay-canvas.debug.min.jssha384-HIM5D9/ENqFhGLpUyM5pWMm1osarmaB3erG7bGpiwoXFiEt87J5/fi9E1txt008N
replay-canvas.jssha384-O1EMj1WMHERAmH/hnJbXPs3NrG018LRoJZg9sFlEfh0gX2GvWuF2qPHuymSqKNUu
replay-canvas.min.jssha384-net+npWNnq/Mo0f/FA/JAQtKAnMWfZYkpOO0SdxCAG4vV81+ZmUSgawvHp1BVgfL
replay.debug.min.jssha384-FmObvv2ZgYXflwUG/6cDy8K8E8g88Nfq7H776j3Jb3ShZNqJboMdv/zLNsudvYN3
replay.jssha384-karIOKGURlIUnJa0WqisgcPexF0o7zmJsl+wxY+j/CNiNpNNeRSu8D38OwIio8Q5
replay.min.jssha384-vkCqYZgYSq9nxpCrdzJ8YEGy1tvvNHUnlOvD+moX2tKOzvTfx2DiPAaNGihz1TiF
reportingobserver.debug.min.jssha384-NKy/6lGtmEBTP2/9ivRHNXEI+EUWqw0Y+VXd/+K5+JuL/VgzV8F+rnN/qFsw5FJ3
reportingobserver.es5.debug.min.jssha384-hwVGM4j6djKxPoTtdfkeHDmMV2GlQkkkLszis9oYtJvXylQDo28T8BWHpHeYqHip
reportingobserver.es5.jssha384-SF/iKpYmvc+I/vFa54s0Ox0/77mwCiQiTUxM4QGLV2DtTGQMXEJ6LBQZIlHev4Nr
reportingobserver.es5.min.jssha384-bqL1mQvkp5GVm8Jofk0O3YqN4oTEYhsYyCAOqH4lAYCqB4Q1MP20uDGYXZOcP1rm
reportingobserver.jssha384-zwAqBOwy02bWXLMawfYHuaMhmOwqvTqXVOGRIH85k/wi6Gn/tJ6EOWxabZy8DloN
reportingobserver.min.jssha384-hCEy+cvuqZSas8MNNCwHwWHPvb3NGg/zABUszU1ORWaJecck98S2t5kl1qNVYRwL
rewriteframes.debug.min.jssha384-dpMLjAm2aLA7pDdOo0+qaDQfLQNtTKKL2PZVpiqOqxCR37w+uyWz8EIePrROasgV
rewriteframes.es5.debug.min.jssha384-BRNfpAntpGIRmfKjwXnIJt7KJBEK2QaR74o7anDuOXLQNtBJKyDW8fKRvtDkQeih
rewriteframes.es5.jssha384-t3cs/KcNmj7H7pqOiBdAjyHmu06WUsSlxUrKN6ouRepz202pjMtulZ/3+THjTs+9
rewriteframes.es5.min.jssha384-eVzb4BkSRPvEpPad6ad9FaN1ERHGEtnlx6cIPf9uIDqZQ90nO4KNlFXZqtV8AKwE
rewriteframes.jssha384-lAAsTpDgN31KNr5i66EgUOJ9l065FVR/airrIZ2GS9MK+lnnaxN7DQRsE3ruKzLD
rewriteframes.min.jssha384-h3hgZolIAraZi9E+KxxKxhl/FX0CnupCLvAzE5numCTdnbnBru19Ld7wJpD3fg8h
sessiontiming.debug.min.jssha384-nrDVCblALTA1bLRyWr3P0hyV0+OGjeA65Ix4mI/5AJFo3TDlmD3Qdn1EvX9BktZY
sessiontiming.es5.debug.min.jssha384-R93YQSiLvuSCnx3DbY0b+bTlKo4hP/75an0TBoPMfI+nW/84RyIl5/n6eMGkHboh
sessiontiming.es5.jssha384-kpTP2NgyuVHAOjcJi6LIeG10O9WGygtifqe8I+uPaaQJVvyntIGqK2BdH4u9QE81
sessiontiming.es5.min.jssha384-H/Vq2UGEDtvoCB0JFL5IjDeFyJXDZVO3Y4qe9dvQSzV3ttY2SLyasch5eiYJ7LDu
sessiontiming.jssha384-DoN+xHy87rLCjj6otZpkLcF4y7wmp2eLNEO5GwjXAV5FI+8ZLyouKXIc94NZzwI3
sessiontiming.min.jssha384-R3fMrRJXBCuE0xAbcYcMBQ1r/7Im1VI4OBxlygxM9n37LXNiBAbDa+zVI7GhOG5L
transaction.debug.min.jssha384-L/Cm4CT/kL0LrhSEzYe4HiV229tw7bRn18pPs7rciNOnNvLALPFIjx2YR3+ZyNND
transaction.es5.debug.min.jssha384-snZRHm6UMblnfgxMrjpkfXHAC0aFv4GGi3HkJlhGW1tP8/BkscGjz5rRx/FH4Ix7
transaction.es5.jssha384-QQb5xc2waNaKJOfDj30KVH1B6s7FNpz/jT+p9g1gzwIJ8ohmJcYw829gCrJhSWPf
transaction.es5.min.jssha384-NdcfAP2Pm/LdkK+0OQH7vYF+t1Z7xfACRMlRhgXeQWY+2ehOWV5rinSe6Mwd41+4
transaction.jssha384-vfGcNEwsxV9UWRptqLcUNrnz/ZMbSDHrA6U8hNC5gFI6RMj1av9qxEujL07Xi434
transaction.min.jssha384-+5IqrSPLQnR6oRL6wchDn+bIX5y5JqwlxXFyS1a9k5ILzRxvGYkq6GM3pj8fJXux

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