Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private static initWhenNecessary() {
if (initialized) {
return;
}
try {
if (SentryLogger.isEnabled()) {
init({
dsn: 'https://2e8b8ca6e6bf4bf58d735f2a405ecb20@sentry.io/1273707',
// more options...
});
}
ready = true;
} catch (e) {
console.error("Unable to initialize sentry: ", e);
} finally {
initialized = true;
}
}
function init() {
console.log("" +
"PluginBlueprint, Version " + app.getVersion() + "\n" +
"Copyright (c) 2018, Haylee Schaefer\n" +
"All rights reserved.\n");
crashReporter.start({
productName: "PluginBlueprint",
companyName: "inventivetalent",
submitURL: "https://submit.backtrace.io/inventivetalent/194573923afb55a5b91ad7cda2868bbefaf0df605ae377a7067af7bd44f88e27/minidump",
uploadToServer: true
});
Sentry.init({
release: "PluginBlueprint@" + app.getVersion(),
dsn: 'https://6d56f92bc4f84e44b66950ed04e92704@sentry.io/1309246'
});
console.log(process.argv);
process.argv.forEach((val, index) => {
if (val === "--debug") {
debug = true;
console.log("Debugging enabled");
}
});
// Create the browser window.
win = new BrowserWindow({
title: DEFAULT_TITLE + " " + app.getVersion(),
width: 1200,
const Sentry = require("@sentry/electron");
var opts = {
dsn: "https://b86f7b0ac5604b55b4fd03adedc5d205@sentry.io/172824",
enableNative: false,
onFatalError: (error) => {
// eslint-disable-next-line no-console
console.log(error);
},
};
if ( process.env.BEFORE_DAWN_RELEASE_NAME ) {
opts.release = process.env.BEFORE_DAWN_RELEASE_NAME;
}
Sentry.init(opts);
if ( typeof(window) !== "undefined" ) {
window.Sentry = Sentry;
}
init() {
if (!this.can()) {
return
}
const config = {
dsn: process.env.SENTRY_DSN,
release: process.env.npm_package_version,
environment: process.env.NODE_ENV
}
// Send any error to Sentry
Sentry.init(config)
debug('Sentry initialized!', config)
},
const fixPath = require('fix-path')
const { getConfig } = require('./utils/config')
const { getSentryConfig } = require('./utils/sentry')
const log = require('electron-log')
const toggleWindow = require('./windows/toggle')
const {
mainWindow,
openAboutWindow,
windowURL
} = require('./windows')
const Sentry = require('@sentry/electron')
Sentry.init(getSentryConfig())
require('debug-to-file')
require('electron-unhandled')()
require('electron-debug')({
showDevTools: true,
// null means activate it only if isDev == true. FORCE_ELECTRON_DEBUG will
// make sure it's always enabled even in "production" builds.
enabled: parseInt(process.env.FORCE_ELECTRON_DEBUG, 10) === 1 ? true : null
})
autoUpdater.logger = log
autoUpdater.logger.transports.file.level = 'info'
log.info('App starting...')
// To prevent garbage collection of the windows
let windows = null
export default function configureSentry(configOverrides = {}) {
if (!process.env.SENTRY_DSN) return
Sentry.init({
release: `${packageJson.name}@${packageJson.version}`,
dsn: process.env.SENTRY_DSN,
defaultIntegrations: false,
async beforeSend(event) {
// Ignore Errors with sentryIgnore == true
if (event.extra && event.extra.Error && event.extra.Error.sentryIgnore) return null
if (event.exception && event.exception.values && event.exception.values[0]) {
const value = event.exception.values[0]
// ignore Socket error.
if (value.type === 'Error' && value.value === 'This socket has been ended by the other party') return null
}
// Send errors only in production mode.
if (process.env.NODE_ENV === 'production') return event
constructor(appVersion: string, privateDsn: string) {
sentry.init({dsn: privateDsn, release: appVersion});
}
function initSentry() {
init({
dsn: 'https://9b448264479b47418f9e248c208632ae@sentry.io/1245680',
release: app.getVersion(),
environment: process.env.NODE_ENV
});
}