mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-25 00:53:39 +00:00
captureExceptions are used to report expected exceptions from domain-util.js and config-util.js. All files that include logger-util automatically includes sentry for those files and report unexpected exceptions to sentry.
17 lines
359 B
JavaScript
17 lines
359 B
JavaScript
const { init, captureException } = require('@sentry/electron');
|
|
const isDev = require('electron-is-dev');
|
|
|
|
const sentryInit = () => {
|
|
if (!isDev) {
|
|
init({
|
|
dsn: 'SENTRY_DSN',
|
|
sendTimeout: 30 // wait 30 seconds before considering the sending capture to have failed, default is 1 second
|
|
});
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
sentryInit,
|
|
captureException
|
|
};
|