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.2.1/bundle.min.js"
  integrity="sha384-VXBbKp5OEiVPansWgHB3LwMPIIE2KgmeyEg0N9kG6WPgGxoEdrlnpq6mlEsKLW0B"
  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.2.1/bundle.tracing.min.js"
  integrity="sha384-lfmsbuRsEhzr1TRWSrhFV/ZV/MDOxidc3Upa/QGdns+L90M3CcPBz0AZ3lxKQW8O"
  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-fiDSPQDOCQgNOrJgnrx7CHsxRqtCnVLsPd8/mw542dzcLxh8DaD1o+Yhy5IhfPhi
angular.min.jssha384-glEOteL1rvN2KINqDwBkOPyi+yM/AuHdHZoW89/oufCLWhmOZvRLTQcMarZLrahO
bundle.es6.jssha384-VKu4ZXHTiP4h9gi5hVXQXHMJ1o1w2fvEX+eMa/ax26nITVuxm+zmrULfVNQ/01MO
bundle.es6.min.jssha384-Ejjvq0l18VGQvXrg0q/IDvzuIfzJQ0Gz5rJ+0jJQKX/xer8e1J8jmyCiOCEjUYOT
bundle.jssha384-znCWMKug69GemgZ2Ov3k2LK/04uM/L6+Qk5QiZpMXnA/HeUKHQ42Uj0jgAsXXzR2
bundle.min.jssha384-VXBbKp5OEiVPansWgHB3LwMPIIE2KgmeyEg0N9kG6WPgGxoEdrlnpq6mlEsKLW0B
bundle.tracing.jssha384-CLmXOPizHab8ddhWrZlP6QKRh7Lj+MztJVcPq9zAbmO87AC0mQCkwJfZnmQWAG4Z
bundle.tracing.min.jssha384-lfmsbuRsEhzr1TRWSrhFV/ZV/MDOxidc3Upa/QGdns+L90M3CcPBz0AZ3lxKQW8O
captureconsole.jssha384-PqbU1orNk6WlvRmDG5N6k5Ej4QMAeudvmtBbl1avljkZ3NhefCMfoFUYRWw1TcpP
captureconsole.min.jssha384-89dz/GJSE9/L79qAtPaRQRjnwsc1X2XTmYK4Ju8MoXVwvcLsF4Yntc4i5y2GZ572
debug.jssha384-pdI914UGRvJ3OxAmw69QtIxJI+BcLFz2fhll90ChFr/cMn8EtG0rijuzucm2Sy56
debug.min.jssha384-gfwqW2T9/pJzXG5kGMjh219m8NxYr4sFdNEmk8Kcmm03LLR3e7u0MUCJtF+BvwlA
dedupe.jssha384-w30Nic/lP8/Lwg/nJr5WAydru2HshwlpwrbablyGtwy93SdrKOXBENhAbFar8U61
dedupe.min.jssha384-991Pgp/m4NC5gP7q/xzXphPFKPZI3iGG04gFtnoHlyH13gSiR/cQJVh+/5vjnULG
ember.jssha384-BMw/efyTNRVtVnW7LU5pL/WpAZmGx0seDEClypjAhftVy4YkVLjYOZ1cuV70AUtN
ember.min.jssha384-AoDWDCFzGgUlcjpTPIOucLHY0TcDkJISfQTounFvJC9id+SLfT+LMV/omYXeSxtk
extraerrordata.jssha384-j0GZVvF7Kmc5q2NmIYqXQ4aTp3b6wPRxgadJcr17ghyalSfGHRQ+7/lUiC1xJOLA
extraerrordata.min.jssha384-2vMT5i/FSPqphwWHV3bGLs0gh1sfLlKMBHyqp1cvZhKmSxQhdS3d11IDrA0rDKcM
offline.jssha384-M8jk1CgtdEVuJngBjhCm0JGJJtSkToohSDaBrowU+kvGVmzT28On3bCXhVdainwR
offline.min.jssha384-nOHWW5k4teYVTgdr9pem7/0/N/mt6DLwL/vipeoYd/0u0lh3Ld9IiRAIWgk+ubid
reportingobserver.jssha384-M9SNdPrem0uLARFUxtHybdkZVjBazyKjd2KEUhUjPY5D4hkx5lwix50nZh25nJJY
reportingobserver.min.jssha384-c8fGh3K1+dBi9WNNtK2eVmaEgfoM3Rq1gY6KeRoA/WSi7RlhxRkUmVK37DJTwr7F
rewriteframes.jssha384-Z4tQCsZgxFl7Zp7nM4rtQV9mh5ReEgYjA52s58NAz3Ixr7kTDW/6+zgztSqfG9Dp
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-cmshJGBwc71Cgt4BcPiFjPgvHrUUZ/T9qUlPlwl6ACV5r7RwJEXekctXlfbFusLi
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.