CDN

Sentry supports loading its 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/6.0.2/bundle.min.js"
  integrity="sha384-mPF153CKKRhOGUecfj8Bo9gMzP/39GkWXC498PTR2t9NU6SRnQQpCM2b3hiUTsEo"
  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/6.0.2/bundle.tracing.min.js"
  integrity="sha384-bYx088otr2KmdfnnyvGJs7h9x/AJcHNDL394J5UapIAFn9eeEPTRHf1qFs7zvXxo"
  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-oGlOwTDeutKQy8iIj86N5Iz+cg3oB7k7DwwAFF+JvU5Ryk3QpBd9RWe7b1dvbytH
angular.min.jssha384-glEOteL1rvN2KINqDwBkOPyi+yM/AuHdHZoW89/oufCLWhmOZvRLTQcMarZLrahO
bundle.es6.jssha384-yz6NKSwq8ETblMO1KY+gsIImJwtnPKtLJIr2V1qvbLK3hQQkFwCEgNsoPIW6swYs
bundle.es6.min.jssha384-YLGjagJWUTfAfIl9Cv/SE1MdrSda6NcrV1FRDhIwqCpwkg2C17CUnbrsAiT/VauK
bundle.jssha384-zFLXmW1fNH+P3R404Rb4ycWbds3u4b4iG2HavWwRCRysBeiAHVKeKVXHxKo57l0T
bundle.min.jssha384-mPF153CKKRhOGUecfj8Bo9gMzP/39GkWXC498PTR2t9NU6SRnQQpCM2b3hiUTsEo
bundle.tracing.jssha384-GsT3ocNcKIzFafBhMusyMsV+NPHan9Wb7WMbcKGm3MuLxIV15gI/rjg4SPI1Ns0F
bundle.tracing.min.jssha384-bYx088otr2KmdfnnyvGJs7h9x/AJcHNDL394J5UapIAFn9eeEPTRHf1qFs7zvXxo
captureconsole.jssha384-yKiobaOmTVFBM4ZcjHZjjFD43DmxkpOBa2eGeSPgtSbX1l3o5xGSiYfP4GQhW91f
captureconsole.min.jssha384-6YIh+FyIHrE7APnLltmw5AcyyEI7yV3pgn5I/aww3gYxGrAsotTDRIsix05d1bmg
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-YvpOQgm1AaaTYWqPqqNDZtxVpphkYU7Hhw7K7DjDjiifM99z0AnaLaaqgHptLk7u
extraerrordata.min.jssha384-32fXO2AIiHJpC33l8L8jhTkgPMY5QyAMH+E+3qyI4LI+RC4BsMtaqi1Y0wncuONI
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-3IU4eWwdCZl4uMJpb4g3XU1vNI+0QVh3x/lqa3K83LaY87QrZLU1NM0Yo6SFv0Jg
vue.min.jssha384-ZhUqMWRVNnMf+BalnWBZFnc647u8W2Rx20+rNjm0mJAG5m5F2BFuN1BtyUkkea0y

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.