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/5.29.0/bundle.min.js"
  integrity="sha384-/dYT/04VSU9ItKRPTkWeVZ0kqRsVh/T/5rNCjzBwpx7sYeeueKgJzGMNXSal3xoo"
  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.29.0/bundle.tracing.min.js"
  integrity="sha384-XAhY32zqfuE8aJxn2jjoj70IiDlyteUPCkF97irXm5oFRdTYUHt+y6n2VLZwBPok"
  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-1fkadBovrkGbTBv43Mla2BhsBZpkh/VPxWcvY5ldYlhRRAkvOv/PJR5Ejl83wH2r
bundle.es6.min.jssha384-rpX3UO1PU9Lo4xcsfZV/GGsMBEoZ6YFfZPZOqbbUhGzLbVw6g4B0OV22RiSmBykn
bundle.jssha384-4SsTIpMPw3laphRX2xWlxwdL4AkDO+bYdUJQrv114mEuO8Evy7VLQyCQcrb3PJh7
bundle.min.jssha384-/dYT/04VSU9ItKRPTkWeVZ0kqRsVh/T/5rNCjzBwpx7sYeeueKgJzGMNXSal3xoo
bundle.tracing.jssha384-AslUBzoq20nFvJEM/OvpN5tm7V6G8IhKng+upwirOrvCoAgZoofi3i6vR07CRPuK
bundle.tracing.min.jssha384-XAhY32zqfuE8aJxn2jjoj70IiDlyteUPCkF97irXm5oFRdTYUHt+y6n2VLZwBPok
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-e6Vy50VfbAicS4Fa6R4tigCfJ3q+ifS/AYFyhP7+OtXcLjr0C8zHCoh2DCJ1EMNP
vue.min.jssha384-FKagncFah3a9nkKNEIDQqXhYnny5Wzc37/AZV5eKKnRVS8uPpeFPdu9dnrvAnRpF

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.