CDN

Sentry supports loading it's JavaScript SDK via a CDN. Generally we suggest using our npm package (@sentry/browser) as utilizing a CDN create scenarios where Sentry is unable to load due to networking issues or common extensions like ad blockers. If you must use a CDN, take a look at loading Sentry lazily with our JS loader.

Copied
<script
  src="https://browser.sentry-cdn.com/5.27.1/bundle.min.js"
  integrity="sha384-oLDTaC1h1q52AeEe8tHrz2rHl4He0XwOB3/lsZ4kafbI6glka5MfnFbK9xkLAx44"
  crossorigin="anonymous"
></script>

Performance Bundle

To use Sentry's performance tracing an alternative bundle is needed. This allows us to keep the filesize down for users who only need error monitoring.

Copied
<script
  src="https://browser.sentry-cdn.com/5.27.1/bundle.tracing.min.js"
  integrity="sha384-nPH7Rousi6RcXhNup3OOExWEQshIYKy4aDAA2SBkfXG2ipYQSX+y6KxFZUVOKxqG"
  crossorigin="anonymous"
></script>

The most important thing to note here is that Sentry.Integrations has been made available, and can be referenced in your call to Sentry.init:

Copied
Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  release: "my-project-name@" + process.env.npm_package_version,
  integrations: [new Sentry.Integrations.BrowserTracing()],

  // We recommend adjusting this value in production, or using tracesSampler
  // for finer control
  tracesSampleRate: 1.0,
});

Available Bundles

A variety of bundles are provided which are optimized for Sentry's various integrations.

FileIntegrity Checksum
angular.jssha384-SNhVmGBfEogNuvLH6gTpL2NLxEB0G+eiCCspXYweVrUlIFL5YXqfGNxHZv8OT6Zk
angular.min.jssha384-GeYI8l+CNFIhNiXyebqMrEKZWkPnlonSxVDdOwZ6TxZdGKtOHJ6nWqKdDoPepxnZ
bundle.apm.jssha384-YRRlHIjhCZVOtEw+Q21wRgJSSaMCK5DfqYT8xodnfaa08R5qXqO13cis9ueOplEG
bundle.apm.min.jssha384-iVw9W8tf948grZXBhLt6fnQZNHa2g9vnJ/XIauqgF6CnFL5eEfEViWg2d+Fy/w+j
bundle.es6.jssha384-luMTsapQv3s5b/+4loKY4CmWzHzwC8y9rlymPAILLSbbVi8DNE35tbwtPnyJfvO1
bundle.es6.min.jssha384-vfuKbdv7w4YmXIQnepGfZ84mSg+J2iNHGAVkkp/ZiK4yCk7iIxOa1H54Ip99OmwZ
bundle.jssha384-Ku0p//tXRYAr7OwQNxyueMDMyFU4xydKrB8ata9BRC1S9jU4QGce6MdWDOF9ejv+
bundle.min.jssha384-oLDTaC1h1q52AeEe8tHrz2rHl4He0XwOB3/lsZ4kafbI6glka5MfnFbK9xkLAx44
bundle.tracing.jssha384-HQEZcevPdTnI+K3vanZ1oa4zCsiO0wqh4vB9im2ATcpBU6tKXd/zWvu4hCs/wn5F
bundle.tracing.min.jssha384-nPH7Rousi6RcXhNup3OOExWEQshIYKy4aDAA2SBkfXG2ipYQSX+y6KxFZUVOKxqG
captureconsole.jssha384-Mw8Z+nWgf2ZOw6OIYM92AE1CQjv2ymQMD9Chl1UdikRfdDmamPrfnSSKbvHlcybp
captureconsole.min.jssha384-F9eVzZTC8N8+p6mvSqBoTIuFHbKq2XFPn6ZtNKPkUBslMACSFOHy3/1XkET00hnC
debug.jssha384-CzFfkxQdU/85sLu1YXX2lWrZU/pJEkSB7qiwkIwFwHQn/+dWp9Qz8YADcVNlwpUY
debug.min.jssha384-gfwqW2T9/pJzXG5kGMjh219m8NxYr4sFdNEmk8Kcmm03LLR3e7u0MUCJtF+BvwlA
dedupe.jssha384-w30Nic/lP8/Lwg/nJr5WAydru2HshwlpwrbablyGtwy93SdrKOXBENhAbFar8U61
dedupe.min.jssha384-991Pgp/m4NC5gP7q/xzXphPFKPZI3iGG04gFtnoHlyH13gSiR/cQJVh+/5vjnULG
ember.jssha384-uIwfFqGm1HIvIFAzmFi7+254jT3en0RDGQBep5yjZlUM5m5+wkxlV3iwtxbRSiDL
ember.min.jssha384-AoDWDCFzGgUlcjpTPIOucLHY0TcDkJISfQTounFvJC9id+SLfT+LMV/omYXeSxtk
extraerrordata.jssha384-gjKqgV48X/Nk5NZjF1bMDFCzfTU7xV3QlkmIARCandpzOqhT4amXWzEklWTXqdzi
extraerrordata.min.jssha384-4FyWD6sRoHviXGGNjFNK3IoFDpXdu3ebnmUYBSfxZ+rKiHmjyLSGkZFdeSuCCelw
offline.jssha384-6AWlLn2pEAwsHjZOeLUKhHPtfAzzAC7GXXYpFW1XZQ1OChliYYUvWwSfrmEPe+R8
offline.min.jssha384-nOHWW5k4teYVTgdr9pem7/0/N/mt6DLwL/vipeoYd/0u0lh3Ld9IiRAIWgk+ubid
reportingobserver.jssha384-ZtU5drTUdMPOWXuUZvgv4QyqMxkDNdiBiEbj8aD5CmwABHCI/XUFd2eC3iRRlc+p
reportingobserver.min.jssha384-c8fGh3K1+dBi9WNNtK2eVmaEgfoM3Rq1gY6KeRoA/WSi7RlhxRkUmVK37DJTwr7F
rewriteframes.jssha384-k1F/xgCZmOcziSivt8QoKMaELWZmjNJFm+n2PX/2MEKWrszB2IL6S4q+JDJ7o/8N
rewriteframes.min.jssha384-22utNfjd1bJOgWt7yrPsUIWR7gluO23PO7d2m30lqrmnj5DH3OmVa8fwcwZhbfPp
sessiontiming.jssha384-9srvADRpjm3FrmiK6dY0NGV4wnTG4dt8onLWUx6LRVN1xhtw+oRJnQ1LtKi4kqGB
sessiontiming.min.jssha384-yy0Jah9kyZt8VCnKVBxDj92pIC/E9XFkw5G6NXx2+0ZJbTBn83Y3X32KqAZxhF9b
transaction.jssha384-KN4xQF97K+t2Zgsqg8FiZE5++QLb0PCD4+v0k0ZVg6rl47vvmUIiSueozKB29Gu1
transaction.min.jssha384-p+n3NUtytg2Zgunyx5gQNdbZk7AieZyquN8nOaL7+hbqbe0SZomZIQJ5apsiXuLd
vue.jssha384-dy+CQ7fSXmIZEzMPlfZ6d4KJvRzMHRGpAEAgJpkieDoerreQ+Z5IgvNstng1Tk15
vue.min.jssha384-2N7Ym5Xq2tbEGuDRYVYY1fmAj2zZgR38wcPnX8nFwtOqL7Cjk0avM2R0GJ/ywIxq

Additional Configuration

Using defer

If you include defer in your script your app, to make sure it can monitor everything that follows it. We strongly recommend that if you use defer, you both place the script tag for the browser SDK first and also mark it -- and all of your other scripts -- defer (but not async), guaranteeing that it’s 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.

Content Security Policy

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
  • connect-src: *.sentry.io
You can edit this page on GitHub.