Ember
To use Sentry with your Ember application, you will need to use Sentry’s browser JavaScript SDK: @sentry/browser.
On its own, @sentry/browser will report any uncaught exceptions triggered from your application.
In order to use ESM imports without any additional configuration, you can use ember-auto-import
by installing it with ember install ember-auto-import.
Starting with version 5.x our Ember integration lives in it's own package @sentry/integrations.
You can install it with npm / yarn like:
Copied
npm install --save @sentry/browser @sentry/integrationsThen add this to your app.js:
Copied
import * as Sentry from "@sentry/browser";
import { Ember as EmberIntegration } from "@sentry/integrations";
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
integrations: [new EmberIntegration()],
});In case you are using the CDN version or the Loader, we provide a standalone file for every integration, you can use it like this:
Copied
<!-- Note that we now also provide a es6 build only -->
<!-- <script src="https://browser.sentry-cdn.com/5.25.0/bundle.es6.min.js" integrity="sha384-hkwF8uNuWxp222vkQQyQsLKwSz/v/SRtfePmH0clVFwqLuxWcaKlWnQtJXegxQaR" crossorigin="anonymous"></script> -->
<script
src="https://browser.sentry-cdn.com/5.25.0/bundle.min.js"
integrity="sha384-2p7fXoWSRPG49ZgmmJlTEI/01BY1LgxCNFQFiWpImAERmS/bROOQm+cJMdq/kmWS"
crossorigin="anonymous"
></script>
<!-- If you include the integration it will be available under Sentry.Integrations.Ember -->
<script
src="https://browser.sentry-cdn.com/5.25.0/ember.min.js"
integirty="sha384-AoDWDCFzGgUlcjpTPIOucLHY0TcDkJISfQTounFvJC9id+SLfT+LMV/omYXeSxtk"
crossorigin="anonymous"
></script>
<script>
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
integrations: [new Sentry.Integrations.Ember()],
});
</script>You can edit this page on GitHub.
- Package:
- npm:@sentry/browser
- Version:
- 5.25.0
- Repository:
- https://github.com/getsentry/sentry-javascript