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.38.0/bundle.tracing.min.js"
  integrity="sha384-COL1vOWQO+0hwStGhZ6r5BKlWlJzd59gOqtCYmcIvfDd0ifnTHrWzzQQYmUNf/Lr"
  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.38.0/bundle.tracing.replay.min.js"
  integrity="sha384-XDXFmBaNWlQ7XLfEYTin+MajORWXtav1ePcSXtuFHSM8q1JXxmiihPepvYcZBLqD"
  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.38.0/bundle.replay.min.js"
  integrity="sha384-UijL43d8wjjDBf6HpHPOJjhHRmQjifrY0h48PF738m/09jhEys0V1hJXF4DFpnv8"
  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.38.0/bundle.min.js"
  integrity="sha384-/oTG1DxxBD0jT/ShtVYNvpwDmS2j9zVqquIKPRo4LxMLUCnwdUywlKzgEIwS1mEY"
  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.38.0/bundle.logs.metrics.min.js"
  integrity="sha384-0txGS2xmlTQKpTAOBZ8hSHBGmveNUEbX02+3xbbuCaX5Ip/TK0whBr2JfiqkeAQt"
  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.38.0/bundle.tracing.replay.feedback.min.js"
  integrity="sha384-dLALe4xd2BLIg+4AYs7sook4NEQBu2b86Twe03sR7GIjDY7LQNkRf82ijrHVV+ak"
  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.38.0/bundle.replay.feedback.min.js"
  integrity="sha384-ydJ2qIVypHCLblHOl65i8xqn60RLiYQJdV7I6MqMXymXnyt7MigctAorEHS+WEO7"
  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.38.0/bundle.tracing.logs.metrics.min.js"
  integrity="sha384-Ip0pTl3rzq6Ru0CmXOngP2mwVlJOkBXKgJ0O0SQvKZc2w9M6pmIgAIh4aK+dHMQW"
  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.38.0/bundle.replay.logs.metrics.min.js"
  integrity="sha384-h+gd/tfQWoBDW5z5qW2vGbPUA49drR9wfvb1OcFw5IPcDBQ3NmnRRqEB/nd0hwcn"
  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.38.0/bundle.tracing.replay.logs.metrics.min.js"
  integrity="sha384-gA6aUWns7BpqXdsqQ8H4XTWD4nKFoans1M4ljpJeXbGGEwx5IbIut1ksapEBSaHW"
  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.38.0/bundle.tracing.replay.feedback.logs.metrics.min.js"
  integrity="sha384-LHr93U++oLSvmhP1E86HCMHYE1wu774txwBpwPSwvqsSI2hPyxs+7ythJ3/8G7o3"
  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-COzoIh7+FOr4cbt/4wGY3YKKbbRVRVj9zNLNDxElqIXDa3Uyd1x59SKYfXXVku78
browserprofiling.jssha384-e4U1VlC8BYwefoNInws4iKHGNL65zcu0KRQCBESAKFjcfNHovGESL+4e2w5SQK7W
browserprofiling.min.jssha384-P0HPLotYvPlEUMxQ3c7q97EP4+OuAoyfM/4SK0LPjTEBoTTcMmcbEnKnyzJEvMo8
bundle.debug.min.jssha384-Oar3qIqA6dXbbJKUUCfEd3YyT8L6IOKIXzCk9EG/JCWnaOHeID8nb2O3DUrtTw3k
bundle.feedback.debug.min.jssha384-e5cYpLSR6NRl5s/S+eBF8C1l9rm5KTiyqMInSMyoyN9yIzWE9zkbEUw0RoGwwi0R
bundle.feedback.jssha384-e0K74xX7MpZcjPhoUrkkG9/HrU20Ae5P2ugAKF1Kxh3/460M4R5woFO0yK014oZ/
bundle.feedback.min.jssha384-871Dv0xxhtE8jduNb87S7KNgQk86Vo5xVby5tPC9QRd3NXT4rsFn5NfdTTwhOBdW
bundle.jssha384-3c5umPz3JluzjLZyafCiaqEbdTwm1vNu/dC7A0QXuqBwuPyrG5pPFoiPY8kU99sI
bundle.logs.metrics.debug.min.jssha384-ReosdwAFhAnSpVcB19RkmEKGH4QF/2TFB8kFsZoi53MOBBX3ed7CvDstJ8lz+CGH
bundle.logs.metrics.jssha384-vgBMHCmn/egpUMV7RCRJr7/cn8czKetIpOD1wW+jFR3Fh3HS/T8N8fe7nr6E6/l7
bundle.logs.metrics.min.jssha384-0txGS2xmlTQKpTAOBZ8hSHBGmveNUEbX02+3xbbuCaX5Ip/TK0whBr2JfiqkeAQt
bundle.min.jssha384-/oTG1DxxBD0jT/ShtVYNvpwDmS2j9zVqquIKPRo4LxMLUCnwdUywlKzgEIwS1mEY
bundle.replay.debug.min.jssha384-pU3xQcY/rfMRn1tCCG776tmYJ38isNCliNt+G89bm2Y/fhO+KXCphU7clDC/TACL
bundle.replay.feedback.debug.min.jssha384-T3iYRh3PutoFJvwcExoq7/lF+TxAAmVenl8q9C1iVSvujpCM/J9xBFLYYfx/4aUN
bundle.replay.feedback.jssha384-yUsOkHzZrHYTxsXOUcUQ2W9TT6/113C+6zN+sM8TSBdObDZvEJjfZyvnxIkEs2jw
bundle.replay.feedback.min.jssha384-ydJ2qIVypHCLblHOl65i8xqn60RLiYQJdV7I6MqMXymXnyt7MigctAorEHS+WEO7
bundle.replay.jssha384-gI5j+G3AHEASl4OW7B0+F9bj8buzWu520tU3prP8FcIY+1Py11Ah258W6qIubrJy
bundle.replay.logs.metrics.debug.min.jssha384-Wbn2sgtP43DBFRy8Px9GebG4QK73SfB9ucysBaQhw58lC6XzhEQ8KdPXR8twQ5Ki
bundle.replay.logs.metrics.jssha384-K7gvQPo/RmsddyInrXWeIQeqAx/A/X8VgW8jDytJ1o8ua5sQlh0NikP02jqXbyn3
bundle.replay.logs.metrics.min.jssha384-h+gd/tfQWoBDW5z5qW2vGbPUA49drR9wfvb1OcFw5IPcDBQ3NmnRRqEB/nd0hwcn
bundle.replay.min.jssha384-UijL43d8wjjDBf6HpHPOJjhHRmQjifrY0h48PF738m/09jhEys0V1hJXF4DFpnv8
bundle.tracing.debug.min.jssha384-14oqsDopKKkqLf21wWYPLQnHFKjH4DOAcUmatwPMOHW7g0Yv/N3Z0F4qlYfWOfjO
bundle.tracing.jssha384-9BkiiMtTHx82WK2Pxl4Y2NsqQJChBS1XQaV0yzkW/Fz3lsa8A2E2chXICFsAFFew
bundle.tracing.logs.metrics.debug.min.jssha384-DAUgxjIsvWi1FP/NMQwb2EaoqF+2rKtyLjSV0oIMOWJLq7CaIVFJmCD8j1Vguy9E
bundle.tracing.logs.metrics.jssha384-lRb3XVF4OJLsmJNyjbdeF1ScTOJwncuN1RmzlEcUDQ58ojbL9JXV+utlFmR0Oo7g
bundle.tracing.logs.metrics.min.jssha384-Ip0pTl3rzq6Ru0CmXOngP2mwVlJOkBXKgJ0O0SQvKZc2w9M6pmIgAIh4aK+dHMQW
bundle.tracing.min.jssha384-COL1vOWQO+0hwStGhZ6r5BKlWlJzd59gOqtCYmcIvfDd0ifnTHrWzzQQYmUNf/Lr
bundle.tracing.replay.debug.min.jssha384-LSnkZ4XTiJMEDXcAVXq1f8RsUTo3Fjq1q5LEVtH0ognBF8FlFS/apWRDxLaFQVsQ
bundle.tracing.replay.feedback.debug.min.jssha384-Hqglkc5xjOBipsyECLspAy1NhBfZLl5qLbrreAPqAtgfv+jF7z8RBiROClqsa4Q8
bundle.tracing.replay.feedback.jssha384-FhjO4fcAIsqaDWctlKPshuhBS+G1Fz7/vbHDrXC9I5W8DDo05nyjqYFJGHcf6WKT
bundle.tracing.replay.feedback.logs.metrics.debug.min.jssha384-eaX1qM+iybC0Q0fWwVFOXwgW63m+GJLY5p1J3cVJvjoEJZEtCg0wlRtJzPIaeY8B
bundle.tracing.replay.feedback.logs.metrics.jssha384-otYhjgzFM95golIXC8SEH0KbxMiQNHwaRfuWNKUG/V3sHdSRlc38viXcXYY3/iir
bundle.tracing.replay.feedback.logs.metrics.min.jssha384-LHr93U++oLSvmhP1E86HCMHYE1wu774txwBpwPSwvqsSI2hPyxs+7ythJ3/8G7o3
bundle.tracing.replay.feedback.min.jssha384-dLALe4xd2BLIg+4AYs7sook4NEQBu2b86Twe03sR7GIjDY7LQNkRf82ijrHVV+ak
bundle.tracing.replay.jssha384-iBSo+dj6ktQwSI0sNLcXgUgKu7561IMtobLgnxKL25zKycpuE1os1K9y2z1/kaon
bundle.tracing.replay.logs.metrics.debug.min.jssha384-YpQiFxutvmg+BDNZojIUgw6+eFLbUsMrtXJDpTkWDXPshegxmyz/HZN0OPAT8P/+
bundle.tracing.replay.logs.metrics.jssha384-0jUKxFmtHJxyp3ZPBeLisVpgCc9KQHLFz7uDrp3EZVWNjVDGr4nWDSOeNcMTDAfn
bundle.tracing.replay.logs.metrics.min.jssha384-gA6aUWns7BpqXdsqQ8H4XTWD4nKFoans1M4ljpJeXbGGEwx5IbIut1ksapEBSaHW
bundle.tracing.replay.min.jssha384-XDXFmBaNWlQ7XLfEYTin+MajORWXtav1ePcSXtuFHSM8q1JXxmiihPepvYcZBLqD
captureconsole.debug.min.jssha384-S+bPBNb2+sf8aHX60gSkWxOOPgcYaJ0RUrGkva2XCU4/Tf6avVOUkZiBfM0TtgwG
captureconsole.jssha384-EuzPHLvT6lSZFcEmWaIFPOscKHLF1qbXqFo87beg2x8i435A4hkSL6ApyXkDashT
captureconsole.min.jssha384-H4okHWgOQPvtRyo2j5nvnqu8gm9wHBVJapUwoJkpx+XiU9qNjVoZ9b2yKTUkpmC9
contextlines.debug.min.jssha384-/J11MtR4awM+0XnHruDhz3HzjPIAx3TD6dkorUmrxpnN8DRxt6+8G4EFJ2g1z0uU
contextlines.jssha384-x90QZy80ofCtRBc/kxFxY76CfN/pQdhigXyzGDCbKaNVwgg3DLv3vRQfe8yNy4PE
contextlines.min.jssha384-h43GZEHtm18zMaCyJxjep98ujhS9KYAb6jlHlRmxIDEzayowOV0dXh7n4uOFZo2L
createlangchaincallbackhandler.debug.min.jssha384-LgswQ2/upybiNbNz6Sd4vv0UEmvaLdSdHgg2aT69otWf2WHwppfBHFu8NXwKoysX
createlangchaincallbackhandler.jssha384-fZ8oxlAVDirHGN7EZkMX55JEeNZ3oZTSxxdnmsQWxUHRyFHebwtdwngI/eElg8gL
createlangchaincallbackhandler.min.jssha384-RQ9jNru/BRLJbmehLJ3oyTsnQokQe0h4mDK0g8fH1D6nyUx89Q2by3Mh2QznibiB
dedupe.debug.min.jssha384-At6vkwvQvYKJn8E//FSVykAtuDqAWeAr7KaHOQvSK2HejHkKyC8qLRykr5AmuAVD
dedupe.jssha384-NEM2J7d2D8OKZLPZMr1MilTRboOGaeKndvRcVbi6ceKtC7jiUCX0j4RGZXz1jte1
dedupe.min.jssha384-crw1wQs4T42ecrrMhp6FqBPleB4TyjCRId9XiKqMhyuLYtLExLiCPBZ0VyzrWMik
extraerrordata.debug.min.jssha384-8G6S4gB9nroZzM7a/zkC/EJPXBHpNfgbWZ8l7kDG0Y1orDidfXX7p4MAECsufkUK
extraerrordata.jssha384-fuRUZU/QAqgaWyFn+QWZCYsVH1lj9Sfjw94bF8kvuhh0nrJ0Bf5SXJxMevHjhvs7
extraerrordata.min.jssha384-XW8ahGLhddc88VIHeNlJ2aVfjP8ZksYLMgO+Lzw/sqNyZC1O/SYknCh8JRhYoocG
feedback-modal.debug.min.jssha384-c5/M8yiDThkRE7GbWnq92jbqDupn0+oq5dc7eruHu2q/CoAzlJMv7ybYdFcoOfwH
feedback-modal.jssha384-4hL/BMElr4PDUs/wrMT88fbQvmVqqxywsIz7cpB4T1f4ddxmi2xV1cpF6NkTBL6W
feedback-modal.min.jssha384-7BFfVRKW5wlTWKQSMwlQNsq3AxlM2xQppZJPZtxBUAMZHSri8Xi5iGJ6PDJPI1cJ
feedback-screenshot.debug.min.jssha384-Kza2wu3SP8+lAJMNzSSxGuC81Tk0dbN05XtkRdumdkj+EQGfZOhTi+Z2ld4wKjVU
feedback-screenshot.jssha384-u5qlFs64FPgS0lbuh/V/0Ifo6UGqpnuP4Xqqb0GTpMofZQnPKQcvxvC2PUgcZwu/
feedback-screenshot.min.jssha384-l5XmOBrTmnI886Zsxz+fbxiodxuaXJYOlN1KGAJnM7hQnD90YZiBZ3WqeKBpkdvh
feedback.debug.min.jssha384-e4YWyoHBI/ADdQSr4ZL7waOCHgwzGqDPsCoq7MB6nDp38kxB54k5uTxRMGSXzc3p
feedback.jssha384-dg2sz1E/jHVzF8XKHxz/dll60QiLqND5gS7svzASyxuxhbpBVYMs9hq7zb8a6rOQ
feedback.min.jssha384-hpl2vA8PwuGwvc8mz7YTuRJupVPQvenvpUTnVca4AeutoN1g+q+zD+EigT/RXBkL
graphqlclient.debug.min.jssha384-lse4FwwS0PzruCXvao1fHlnfXiB9dUF/r7YId0e9462MaBNxq3TSFaTfWn6Ps46c
graphqlclient.jssha384-BU7eefbdm24qs49MlFRNSV5boFJNy9kRUfeJbVjkeu1ItoNJv0dVKcYLwkOsopGH
graphqlclient.min.jssha384-dG8TIxoam0Z5um8xFxmSuKZ1ODTvRTJEHLr+QmElEiVMNd3u3ES6gGurFd5dKrj3
httpclient.debug.min.jssha384-1DL5C4s4sF7miyQ+248NfvA0LmzyqNElE6p96JEdiNp3SnZVi/Es67Sb+sdbW3Sk
httpclient.jssha384-PV9LhrZAw15uXqqNx6rahIZfkD5zA7PJaZrnSpqN3/SIK52o1RUCZ+e1DEfD9OOL
httpclient.min.jssha384-0eG1q/JBDYtNHWhXsl5qRWnOhtU4/0ynG/sRJ/Ff/K4Tii/EIcUstwXkpVEbzowM
instrumentanthropicaiclient.debug.min.jssha384-R/9UsYBxzgJk0GZdzuQq6FlyH0yiGZfMI4JnLIxRbKci09fzlC5V4HRSObtBJZTL
instrumentanthropicaiclient.jssha384-6Gj+sedFJcqKkHXAWQgZ8gohf+QsFZzdxrbj1A/ig+tg6fiIu0OWiedxpBf6U9bq
instrumentanthropicaiclient.min.jssha384-PrfQ5yAYPHs4sP5PCxIykl10WIR2vzQlxI5Y8u59EV5/3eGe1fKr7GZZowLzxsKz
instrumentgooglegenaiclient.debug.min.jssha384-Q3eo1GNdNvEcEKrPH/jLczCGAaZmtK2NNVLeNFR7Pp1NghOXSwZMn+rpACtxX3kv
instrumentgooglegenaiclient.jssha384-dZp/ENrjO3I2ITz64dnBJycVAUHiyPIpJe0cWMgPYvHxv9EVhXJfLBuC5rhOw9ho
instrumentgooglegenaiclient.min.jssha384-DSAM7+/fE7GEbOw9M54ftWclE7OdBz58vSVAhjh8yJ6EBNizCk8vOxWKsnW8RwfP
instrumentlanggraph.debug.min.jssha384-4cZOZcBo85eQK/L4hCGqsBQXtez/lwEJwJA4sSzdcBiqJiHnRaWScKKVMJTtD2gA
instrumentlanggraph.jssha384-15oKckAqzMhHkRRFJ8//Xd/lO/GkLEn4LnegGj4UsbRHxsteulnfk0gC2Wfcbq4O
instrumentlanggraph.min.jssha384-Uzi/nqv9YfkGlfXFlI1EjnNHGbHs7a76RxjUb6EmE/SJ2ECo9eIO9NnU0+AVsG8d
instrumentopenaiclient.debug.min.jssha384-Mjt/fp7QoIqrYvO0CyAbTp3a70yh45nj6JeklHiXupRgILK7QNjD+TPPXem7Fn0G
instrumentopenaiclient.jssha384-dRR8PqrxwKBiFStr1DJ7s6p1Ad3isf5QtDjzhA1aN3fr6PlfgTbPxvBx12GVpCh0
instrumentopenaiclient.min.jssha384-o3zY9SYy5KBiXqXlqLWBkNEj1ekHkPZ+3wSCXW01TNt0Cgpxh5Koq8lNQ71QE1at
modulemetadata.debug.min.jssha384-fCr3g5GoP7dVr79hHSqP9+0kHbpHnlYlwnudYEwBk4JDG+WSW2Uo9+ixnmFgTPTZ
modulemetadata.jssha384-B2kfOt3RPu3d1w1BINmlO9l9Zd+2JLAEU1KmxLOxWGkqhdpwsLVU9etrtxyTv1Qr
modulemetadata.min.jssha384-FihrOJC/fezjGACLsvmFSOiz/Ayd3Dw5hf3unq6T9UGV9F+1V0CuGKNsfu5Z2PAp
multiplexedtransport.debug.min.jssha384-8ZlYRsJ+cs9qvfMC9kY8WvPsQxsXXbg67QPbAm88FTDmDNZD2gUrXkOhDUrU3qmD
multiplexedtransport.jssha384-8UAY2A/ZK1YlmWRx4uWzHb+MBhIYp/imuQv2dY3Wanmy3Q7i3H9qIxi2NTaHlvCi
multiplexedtransport.min.jssha384-/+4fHi3NtfzwEPQ+HUNKZVY/VDSa/eqChfSUZTSStI5UALvUn/+TuyaXp43oj030
replay-canvas.debug.min.jssha384-vc0qkkhmWar/t3+VgckghWcBhh3D8OBy0mhtZZDuJAYGwSp8ZX31EXWogVU/V48t
replay-canvas.jssha384-ZlIMEpZJ33WpvFLLHdKwPZYSuE/2G8IY5gkqC5Us7To+cAH2Ur9rxOqtUUnsX60k
replay-canvas.min.jssha384-cQEbU3qVkUpsuxRJuPJAUgAX6+UKmdtizM4w6EGYlwWQvM3wVPJu2Z5nqG/I+L8x
replay.debug.min.jssha384-gVJqYamtGH7QBXc9QLAhOJ2vm+OOm1vb3rrFyDErYdXOFOkt5CXOUWH0r0KJZIx9
replay.jssha384-3wU7xMsO2MO/k5EsHvJBHnd32HIBBPl24lHwRVewQ06YJzgG+RVvoOedWdzjRPjV
replay.min.jssha384-YqM1lk1FXkzbtQcYDrFdjAAEa0zcpRT8SnHgKh/j1criN4WYpSMTwyohDY7w8NmW
reportingobserver.debug.min.jssha384-VKDyNT4hPzGktfIq4dcIwAo/yfPOqOARECSrr79JJj/2SYsJnKCAEBQJQxzkoYu/
reportingobserver.jssha384-5bJV8DtmMi+F063sjMFnWywuNhnsb6c8WaL7LciBKMB5Xs56HU2mlezqRZ3puyPK
reportingobserver.min.jssha384-S8b+MfB23Y80FxTPuNEwVomroQ3lwzwFCLC9Q4lXZNiNXxkjSrdr/HnXnS+XuIOn
rewriteframes.debug.min.jssha384-plQkYrPTM9A8TWyPhfJS9/O/R2vaTAGke9erqfxYZBo5KN8pSbQdOKOo5OK2cqGw
rewriteframes.jssha384-phLQjTOTbHYswahrm9Fc+Y2UTW6WYlxAxfeY3rjamFRe6wbqqQH7j+xZR9Mp2++1
rewriteframes.min.jssha384-YC3FYCCKEIM87C4PIQlzgGmxoZERh55Ue5/GUU3p2J+Ovp4wlI3Hq8N8DBrOcPwl
spotlight.debug.min.jssha384-Mm9VZ50KLl8tedA638p1xaiWI8Nzrhp1PzYnQjPFUFzPFUU4Gj68QSgNYbQxMNOo
spotlight.jssha384-lsUxLum6MI0ktRPe2TRcGYuGA0ztJ76VBrwkX7Hh9mqk/mSXiaRIfH1c/yHLDfEW
spotlight.min.jssha384-c55GxypNKKgctIxl/ETMUsr5AREr5pi/1/5Y71KUzlkVTeV48j1h5XSDh5Y7fqMR

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