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.111.0/bundle.tracing.min.js"
  integrity="sha384-zbLcy9H6obT3ZcKjGlb5Ai7vi4G0vXMLB1UU56WRyPJWarHEDeLOkuJ3HwR/7IDd"
  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.111.0/bundle.tracing.replay.min.js"
  integrity="sha384-CgBRRmY1soODkeXgfql8ClN1ZGYdCFgg66/oqUikHrgqPckhSzuGUisIpnqlPIA5"
  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.111.0/bundle.replay.min.js"
  integrity="sha384-HdmOolCqRrcpLQpd7ma8PvAB51setd4Mspw5qH/3Ouiw60W0pL++cTF69bsq8KPC"
  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.111.0/bundle.min.js"
  integrity="sha384-gdEsWR4zajoKX3TkHnYc05du6Z7FFE0HffN+smREi7as3mQJwJRu2bRvQ71hoVNP"
  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-DnHLpdceBv7oS+Jj2+deeirD9DlAeF9/F2CQNZ9aRQv+pKmZOQ1cHTNYy8gsGkeZ
bundle.es5.debug.min.jssha384-PLbcLdnVC0yTZf6NheRxUmSmpFZgN50n02eCPgy49x0KYpvEHkFblKAoKUfuG8nR
bundle.es5.jssha384-JFAbMfQevMgH6EMFPg4YocKU3vNrOTKfVTypkTKSPOfIsyJzGWGS0dPtASjCmd+i
bundle.es5.min.jssha384-zNFSiwhNZEvmkzdzgValnBkLkuUYl4HwVdt+9rLoaLTKGt055exPkvN7YOcs5BwU
bundle.feedback.debug.min.jssha384-Kz6kxv7/jgncS5fBdhLCP6pwA41ElDeZT+7/rVl69inGBAo3R6RVQCQ81twV5tur
bundle.feedback.jssha384-JnYa0jueABR+S5pwvq+z6gBBq6VuuGaggfZoOemf4Lv7esD/OqAHZcgvLE9511VI
bundle.feedback.min.jssha384-PDnWzmMm/eo/7yintfyB9LVRG/Mjl7ZhYQIeSFD6K1PORfUIDoKMm2Dvm/UlhiuL
bundle.jssha384-wGScwgIiRRVijDJZmgKNelBKd4J/FvJwY0fGjGNKNmF6qjrZURkO7iORsnAErh8o
bundle.min.jssha384-gdEsWR4zajoKX3TkHnYc05du6Z7FFE0HffN+smREi7as3mQJwJRu2bRvQ71hoVNP
bundle.replay.debug.min.jssha384-bhp4JpSD2TYSvQ1Q4Z5/NZre/jdQncPl5X6Txa0YRgcawuY/532EFtI7Hir8+6sd
bundle.replay.jssha384-ccwQnPtSLv/ER+rw46lqGzf4Yhz0yx6rleCPCgfb4Q5z+qbO9AeaBjK/aCiyOp5J
bundle.replay.min.jssha384-HdmOolCqRrcpLQpd7ma8PvAB51setd4Mspw5qH/3Ouiw60W0pL++cTF69bsq8KPC
bundle.tracing.debug.min.jssha384-jMh7dYQG+4eqvLzRnxpXmShfT+MnKntEj+ggEqfQsnucZXxfiCSMU3kPF96LJ1mc
bundle.tracing.es5.debug.min.jssha384-FKBybW3YDabIXIAVDhgB7mRN8nlT37YWYJ+Wov41koA4VJRjjKlzjXjO3oMRNbMh
bundle.tracing.es5.jssha384-HNaza88+vKIv1oi/vOUPXidA+3LM14dMdI81lULoTfzrdWhX4BPNFm8iCxAEl5wi
bundle.tracing.es5.min.jssha384-Rw4y3O/qqG7nPDGODVQ2OMmKCCOGjuvy93PcIuiDlY4Gol53C5HEW0xJxq12SKsC
bundle.tracing.jssha384-9m9VnPplODrKXmkD0+6XXYoowdllglIQAa6Rt8X0PHlWt9X6ACi4Apk0uGVbs1DP
bundle.tracing.min.jssha384-zbLcy9H6obT3ZcKjGlb5Ai7vi4G0vXMLB1UU56WRyPJWarHEDeLOkuJ3HwR/7IDd
bundle.tracing.replay.debug.min.jssha384-kDHcVjG43hzUzp0eXPuKrnA9LStDUWAhxRfu+7U28I2q/Q1QPpJ2J2MlpZnq8oV+
bundle.tracing.replay.feedback.debug.min.jssha384-ZLiltATwC6eQkUJEIy0I8hF3DltMGofZxh629b/zYi0K1bXrJcdBu7x52kUa9K0j
bundle.tracing.replay.feedback.jssha384-pGnoFJDW1shXZtp3G5aVyDUP5pMoUX40dgUxfCl0azKaPAle6u/SLWm3pAIMzeqY
bundle.tracing.replay.feedback.min.jssha384-vpfAB/ivmdk27CtEv37ROYrInbgkdFhNeJEhie7sqyKJE3yybT4xDKqYDoko112n
bundle.tracing.replay.jssha384-2YTOxnaQdkmxfRSqMUNvKGS82jAuuKcOhaFkb79m9/IaciCsower9e4e0REKc3dy
bundle.tracing.replay.min.jssha384-CgBRRmY1soODkeXgfql8ClN1ZGYdCFgg66/oqUikHrgqPckhSzuGUisIpnqlPIA5
captureconsole.debug.min.jssha384-jmIPyNpeGRayqt9wG/fRjz0Y+866iPcOB2YooKvAT6Z3AR3h8bSdk7PdDKVI8SWV
captureconsole.es5.debug.min.jssha384-sWl4vt6acJZ1OEkbzlQ1t4WgxLh9L9+kSbqFRLLYuF7Pb5TZ+hm+oa3zz8KyNXHl
captureconsole.es5.jssha384-XyL7N3i7HPZfJ6QVI4HeYOFpUcG1bnIZrCJXN28ljSX2VZsU94hJs0dNw8Oq2cIs
captureconsole.es5.min.jssha384-JwhYwk2ZusKNMNDYOst8QPSfecT2MfIxn39gbUxEDqdTKcFG51oSb8PGPy96AIrD
captureconsole.jssha384-D9fdOhuGQBB+m072NmalhfbZMW1/Nis5ctfgSdn8XPKdhe4iLSdKxV7X7MaziudX
captureconsole.min.jssha384-29aW5YLMCGJnTd6js4VqwRHQk4lBe44qavgMQDtiMsXya0LpJqw5UqQDVyenw+SW
contextlines.debug.min.jssha384-i5jiXgAmtWGHo3/exwDrTvQ5uCNOA9M349UvtKyKiybV1aeNLlKmLaQeKEoJy7mw
contextlines.es5.debug.min.jssha384-rFCEb0bP1jaLnkGqPUU4HqDIE3PK/dlA/yJs38Jxw5BYQ2Ri1rtfRIXrgwdSCGk8
contextlines.es5.jssha384-zDka9aaaBYH/EwYPfnTsB/gHr3BdhQ890on7QxzZvKwUVlTA+wS2X/SB+6jq8IhN
contextlines.es5.min.jssha384-ZTDxrXU3l3x1v65stpssgEbTaqEFIUVtRtLo5dQpWYDRuaxKwNOWmFoL19HT6bo1
contextlines.jssha384-zArWWexG2gNf46Oksx+YEsrZVPg43382lAK/jRNs5dNjIM3FJLe40xwl9k4IBNHK
contextlines.min.jssha384-BE08DfqUZd3Uh62TXAFqwtkaJS2eUe6SagUCWY8K8q2FZtUFAfc5/QxJpWSiFdkH
debug-build.debug.min.jssha384-GolGS0FGidTdLQywTBUzXuFreLj5UuJLzwdap6N9aXpzdDyYcqAyIOpLPVlpzIpQ
debug-build.es5.debug.min.jssha384-seu6FGGGoFCvQ0+hai1LEv/fS/ntzPU8s2EFj/H3+j8GM2qHi0gAcghmydSoOFUP
debug-build.es5.jssha384-DNe8QUHq4VDpsLG5VHz+pYNbqhk5CNo11wYyViSoD7sTtYegaEwyMhp7eW6MzYZm
debug-build.es5.min.jssha384-hCOxU33VYQMjuQXoxeK1NOaFcLdVyUEJIDYYIJs980GXvKeu3JbUl8UQvPstTtsk
debug-build.jssha384-IW+bHrjpzBXiALIFGOfagrCI5Tm7/Uts3tzySY9nz0uml3jZEpoOz9FZfH168k0P
debug-build.min.jssha384-6PrHfOSB+7q4rSSMozjUHTBOYGkpsho2s1Kr4Rpssd6+/uKxxawtpMq626WCLBLf
debug.debug.min.jssha384-MnUWHAqd19Flwq0YkQrZ4tRrikiqZvWSgoXDzj6PF0m6yAtPeJk3aRzIyselSfRy
debug.es5.debug.min.jssha384-IgPPRBwXIaSApI4q3f6HAGozgGWKEymmNyPVA+ar+V64Mf58lbnrsxZl7Xp4Jt9F
debug.es5.jssha384-KJEaqb2R8xRIVMVZOqgRVT+lxO0SIS+TqU/kVc8CjNOACsRayojHT+6eRlSqd7D+
debug.es5.min.jssha384-yytPiP/cOcxRonoR5bYboe08R521zXrhXfYCYVuZNfp2RUEYY9k6Y9VN/Ppl+obQ
debug.jssha384-8VLUTZ3hApeP5rG6PoXvIgSSBO492zCoWgzOFq5tSdSWFk7iO7r73mOqePC9U5Zf
debug.min.jssha384-TY1mfIf++76moKf3Y/bwK3MnqznH9G8FDChGl+XBloCfz4/P8IHe05ZRAeNzKcxp
dedupe.debug.min.jssha384-//VgTNmP93KvS/PY2lf6s2fqI0xvgymp9kG1xYQidKe23voAcGSkFJbfL8Rg0yBQ
dedupe.es5.debug.min.jssha384-vxMzkGBJy9KRoK4CmQOf1HiZutzKohsLSAfAE7b3aYmmkcN/djKrrvxzBu/Inwrv
dedupe.es5.jssha384-NQJVOT/YJk/AsU22jxMwCTg1m0Sh1jf3tGo1TfgvIMLA/MRolw3JBHWr5hdMUstd
dedupe.es5.min.jssha384-dUbt4n20+pX2d/s4a+vhJjrEf66CzOSUB8iTI5m1yzur9r+T8T2QZ5O66H3FU39e
dedupe.jssha384-IKJmQKNc6EyDFwCQnPcCCZE9TXn3Cl7nb1VVNqOGwgotC+z7V8fz0UYfYQLQSuHK
dedupe.min.jssha384-zoP8s1GQul1Pra8zU3ks1pRWgcBgKOXrLoHfSnRkKgYgcPiAUoivx6QX5HprQq7j
extraerrordata.debug.min.jssha384-RkYy1t2SgNlqdKYvAJOzqvFrqvmA/WPhEqQQRTnlnVO/5SwrD7D10UrCFcxwN4FV
extraerrordata.es5.debug.min.jssha384-MeA/Pb9At6+SBhhRP5qINL/hfiiZlzbHqqZpcgUTfza9jhpJjbEo4LnbnFmrEuGr
extraerrordata.es5.jssha384-O1SGTRsYOtxAdaPXq/aF1RJA5UbcN6VY8SNPNQ3qGrvRlhxL1hKM9XxCIBfI5j77
extraerrordata.es5.min.jssha384-pDeY/rEQMNC05A5QKVxPwqGv8BA3Gstlz+ClSCZ/COLfthPnPS4F9XbPfyaofmET
extraerrordata.jssha384-YwTi5L7pAKOx3IP4rYM4ouxz6teJha1GBmljCeGmnRR1pLUf0YRjxGrWgLYg3mOe
extraerrordata.min.jssha384-r3k2vgFZC0BQp9YISRTi8gYN0wPj2QDZLZEdx3QhDd1CfJx4nZv9O69zgx/gIRt5
httpclient.debug.min.jssha384-WRa8/ed+hHXXv/QuiD+4cT36sZxHdkGC9/uPJgxXcGJmAmLK906VRt9suRX/cJQJ
httpclient.es5.debug.min.jssha384-S84Roii3v32tR8k44P8RCvLYB8Q91d80S0O3xp0j9q5Ft6ZCJTe2YmP5be8hVHzI
httpclient.es5.jssha384-5Z31WiHvg3w0RvORUCexBGJUDp4Y1sqVUVwj/G/Qsv040EgqsjL+6QBhAI/z7FoL
httpclient.es5.min.jssha384-eqEk119aeOvlqFWXAF3bQAatqXNEMrWizFb+SNo0iFFFrIYC0TniXhs+rlQ+qd8D
httpclient.jssha384-xcZErMcmAP0cpfDtXSuLH1of6o7p1LTHtFcPZgigCWcPYcKlIJgL+13GaS8kb8Hz
httpclient.min.jssha384-EYjDDicC80O+zTpvDfF/gq5APmkkz5bHzU+BW6/e1qm+T6eG0afomCmgDNc2hoJS
offline.debug.min.jssha384-kKAIqtz/9D8QhNEahQ71aWlCmInQEbqHcl5MYS7Ph1aC33NIgx7tpFMgwxRhlLBn
offline.es5.debug.min.jssha384-rPTakIJG55ZhnAV8QnPNfbcqiKAoRrJ3MP/5m8QKDd7/HaNYfXOOgV6uKsYRFY6H
offline.es5.jssha384-DhU7CFthX6/cVYF6HAeajsd6vXw1d0NCQpUix4XJKXdsOI3/CAB7KFFWdKkKi7HX
offline.es5.min.jssha384-SGB8FXemsQc6RUFOQ/uQegoUJduI86A8Ut6wSyTWVqBMsihMtiPovpaJvr1Vbt4C
offline.jssha384-PMGNvEcTQXNhQXeLufALDRBZrpduRMTqE7IYGwW65Ibzd6EYEeMq1jpPhsHmC8f8
offline.min.jssha384-PIPx4QUeKcSAEctNY7FBUYwORyAC6ms4gEIqA62VQHq9FWwWgaGYn0HS5tvrXWbg
replay-canvas.debug.min.jssha384-iemqr4nuUQ88tCAjGPvC+lSQjzB7brkdTzKnmk54xOEMrdthxf3HVlSLgU0epJJv
replay-canvas.jssha384-IBfGDlX8JWJcQlp+lVjv2ml5I/eENxW7sCR28pQYTsGeUzVDV4Lk6AwBT4cqbV/3
replay-canvas.min.jssha384-H4z0kB4V7zlqkU/kyxnuqbDN/2Cj5hh7C5kn1FjNWM8ETQK4uu/8QgXntKDvtekv
replay.debug.min.jssha384-BJzLA80uDV0bURXSrguJYkIflWB+VLyW1DceK6jM0+7QlVw+g3YxP6CvQfQANf52
replay.jssha384-iOr/wODZBpLgV40zKBmXxCR/puygnk90YiOJOgGxcdAlH98M+zs6C/COarzo8aJm
replay.min.jssha384-uJ3kL6k4ldIW/gohhzrQNy57SrcEysJdq/fezvN9lWIasSlnwsFHTSkkwSKcXLcr
reportingobserver.debug.min.jssha384-zBSmMNamWfgCqwlVnha4w+h3Gc75/oAeOisXOCg3bzTmmKZy7AbvInFARAThR23A
reportingobserver.es5.debug.min.jssha384-sIZB1QkPsemw9H7kkdV8hTFzxLzLT8gBv6Mvb+ebUTUp8V5xVBTQeTFRF+BhTkeO
reportingobserver.es5.jssha384-OMW6uGiQGzqE6tmk4uoOXI1zcsEm9tXmnByhPzi3sJLPazBIACWA3+0Rn4/EweJS
reportingobserver.es5.min.jssha384-9jSThnYp4/mhjmC+5zanAZ2EemlufVhMixOG/f8WvyV7UzGROQBDE+faVT4cq4Y3
reportingobserver.jssha384-2QyGHZFTpYHdUlhTVgBeC/wHqdyLq9RDsJyXfO904CS8LELUD+09kWrXU98KQEnI
reportingobserver.min.jssha384-9beq8NMVkiPCxCHWbwbwlRfT5IVeA80cxI9BuGU3oWVOeZcHSiFo3p0QMhS5zxPH
rewriteframes.debug.min.jssha384-NuS8XjuelJfbAcP/8gr8b0FAHBDCfCnIwziPJuBSxZdUs2RV95vobgBkeN2ZrFHb
rewriteframes.es5.debug.min.jssha384-TCm9h9qMd3SEwy97bgnlX6e32V5YiE/gJ/A694dezESyqKqrz6ctc8dubp41ZG2a
rewriteframes.es5.jssha384-vq0UrLsCFLIpwcARyvk7TxWQd5KLVHqkSZJlmlnpW5myE7V+ch7+PBJVOmvGL7Ce
rewriteframes.es5.min.jssha384-mkDD8357fXJkh0rRBeu3gt1O+CeKekrNW2lqqvnjLXhAnGej56DftSwz4/gX/MHl
rewriteframes.jssha384-CT/hC0l2dQF1iiNm1vGdggamNbk3USEl9+DjCzed8srR9DPpCgkqKEchtHhUtqz0
rewriteframes.min.jssha384-Mdgh3Cy3O4olczhm8+OC1qoQUjDK25aDL8HHrC814MWGxNVQRQwNgiPKx7XVH64C
sessiontiming.debug.min.jssha384-8FjpqgmS0FQbvYErHuiLTl5phZ1AikEZk05lGKG2tLOMGugsz59YBzS0qBmABVTx
sessiontiming.es5.debug.min.jssha384-/Ya9bY4u7GAwG4aGL3xxazKUlb5Tqz4WGl3t6kkoIc0VgvtEgRccx35tI2CUSG2Z
sessiontiming.es5.jssha384-oXJs5SD+l5Mn+LOVhoKrdeUDw6d84mQnq/liIw788PHaL4OimhGClpvp7nnTYtCk
sessiontiming.es5.min.jssha384-5RPGfMP8eaUM6m23oIWG0H+YG9//O8ESEvTA5dNse0YfvP6If8FY5bhqgFar6bVa
sessiontiming.jssha384-b0z2NtFPzucTFxWviDyYfXdHxImV7srzl3VPlkVpLEpRnWk5jHZxCtOuro1vERQE
sessiontiming.min.jssha384-qx+RG7AvPjYICiU20zxT59OAss3iHkhpqOIfYNBVrziQtW1DHjuIxkrbKU9TO1mT
transaction.debug.min.jssha384-Ztt0ocLrY1YZJFqBRucT+Gc92qqca1SLOx+pEXnqBpjF63cpo7bwzPBoBt7h/x01
transaction.es5.debug.min.jssha384-2JCyBzUBa84DEVh6rTPsjNAcvadpTHD+6KBfsdxZPHyK3VRcgGqDkcyf3Y277L+o
transaction.es5.jssha384-ohpYPSknC/f7Sco1byPFO9chRQOlbonxjQLJ1vJMbx50g7tsdPqsW+sKm0iz5Y+E
transaction.es5.min.jssha384-GSNOk1Z932yEZv1n8nSDoI1BHsJwKAi1Inu8yGZRB1tY6ktSf93jDLhr77/cXsjN
transaction.jssha384-bRFjkvWHUedtEOtu8tz8OhrzGVukqMy0bcJ1WVwfgK5zYhCCRsZFrhzyVspjR07u
transaction.min.jssha384-QG9wL2gibpCid5re78RAypvYpRVjjUnsZE28Gkn1xUsbR6Ghlq7OwkYP6IhtIYKA

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