Files
zulip-desktop/app/renderer/js/utils/sentry-util.ts
Anders Kaseorg 7b095a683c Replace electron-is-dev with app.isPackaged.
This unfortunately uses remote, but that’s what electron-is-dev was
doing anyway.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-08 23:14:00 -08:00

21 lines
754 B
TypeScript

import electron from 'electron';
import {init} from '@sentry/electron';
const {app} = process.type === 'renderer' ? electron.remote : electron;
export const sentryInit = (): void => {
if (app.isPackaged) {
init({
dsn: 'https://628dc2f2864243a08ead72e63f94c7b1@sentry.io/204668',
// We should ignore this error since it's harmless and we know the reason behind this
// This error mainly comes from the console logs.
// This is a temp solution until Sentry supports disabling the console logs
ignoreErrors: ['does not appear to be a valid Zulip server']
/// sendTimeout: 30 // wait 30 seconds before considering the sending capture to have failed, default is 1 second
});
}
};
export {captureException} from '@sentry/electron';