Created
February 3, 2021 22:59
-
-
Save robclancy/a7594f1091fbd0e7275e81870425592c to your computer and use it in GitHub Desktop.
Ember Sentry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At the bottom. | |
<script src="https://browser.sentry-cdn.com/5.30.0/bundle.tracing.min.js" integrity="sha384-Wmp0Jx28tGfR086jrVwifMRcSWk8HQW4TWQ6XsNtI90pVj0dgkH9r2+pI3L2CLf6" crossorigin="anonymous"></script> | |
<script src="https://browser.sentry-cdn.com/5.30.0/ember.min.js" integrity="sha384-AoDWDCFzGgUlcjpTPIOucLHY0TcDkJISfQTounFvJC9id+SLfT+LMV/omYXeSxtk" crossorigin="anonymous"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global Sentry*/ | |
import config from 'postedin/config/environment'; | |
export function initialize(application) { | |
if (typeof Sentry === 'undefined' || ! Sentry || typeof Sentry.init !== 'function' || typeof Sentry.Integrations.Ember === 'undefined') { | |
return; | |
} | |
let options = config.sentry; | |
options.integrations = [ | |
new Sentry.Integrations.Ember(), | |
new Sentry.Integrations.BrowserTracing(), | |
]; | |
options.tracesSampleRate = 1.0; | |
Sentry.init(options); | |
application.sentry = Sentry; | |
} | |
export default { | |
initialize, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-env node */ | |
'use strict'; | |
module.exports = function (environment) { | |
let ENV = { | |
// ... | |
sentry: { | |
dsn: process.env.SENTRY_EMBER_DSN, | |
release: process.env.RELEASE || 'local', | |
ignoreErrors: [ | |
'Ajax operation failed', | |
'Request was rejected because it was invalid', | |
'Ajax authorization failed', | |
'Request was rejected because user is not permitted to perform this operation.', | |
'Request was formatted incorrectly.', | |
'Resource was not found.', | |
'Resource is no longer available.', | |
'The ajax operation timed out', | |
'The ajax operation was aborted', | |
'The ajax operation failed due to a conflict', | |
'Request was rejected due to server error', | |
'TransitionAborted', | |
'Network request failed', | |
'ResizeObserver loop limit exceeded', | |
// 'Non-Error exception captured with keys: abort, always, catch, done, fail', | |
], | |
}, | |
// ... | |
}; | |
// ... | |
return ENV; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment