Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_setupSentry() {
// Initialize the Sentry connector
if (!sentryDSN) {
return;
}
Raven.disableConsoleAlerts();
Raven.config(sentryDSN, {
name: this.deviceHash,
release: this.getVersion(),
}).install();
Raven.on('error', (e) => {
console.log(e.reason);
console.log(e.statusCode);
return console.log(e.response);
});
}
_setupSentry() {
// Initialize the Sentry connector
const sentryDSN = "https://a556c0165bc74435952c95dccc5938ec:484978beb99f40208cb86610e66bead6@sentry.io/144447"
Raven.disableConsoleAlerts();
Raven.config(sentryDSN, {
name: this.deviceHash,
release: this.getVersion(),
}).install();
Raven.on('error', (e) => {
console.log(e.reason);
console.log(e.statusCode);
return console.log(e.response);
});
}
extra: {}
}
// For backward compatibility with deprecated `globalTags` option
options.tags = options.tags || options.globalTags;
this.options = _.defaultsDeep(options, this.defaults);
Raven.config(this.options.dsn, this.options);
if (this.options.patchGlobal) {
Raven.install();
}
// Handle errors
Raven.on('error', function(error) {
var message = "Cannot talk to sentry.";
if (error && error.reason) {
message += " Reason: " + error.reason;
}
console.log(message);
});
};
_setupSentry() {
// Initialize the Sentry connector
const sentryDSN = "https://0796ad36648a40a094128d6e0287eda4:0c329e562cc74e06a48488772dd0f578@sentry.io/134984"
Raven.disableConsoleAlerts();
Raven.config(sentryDSN, {
name: this.deviceHash,
release: this.getVersion(),
}).install();
Raven.on('error', (e) => {
console.log(e.reason);
console.log(e.statusCode);
return console.log(e.response);
});
}
{
name: this.deviceHash,
release: this.getVersion(),
}
).install();
// Just give us something random that we can use to tell how many users are impacted
// by each bug. This is important because sometimes one user will hit an exception 1,000
// times and skew the Sentry data.
Raven.mergeContext({
user: {
id: this.deviceHash,
},
});
Raven.on('error', e => {
console.log(`Raven: ${e.statusCode} - ${e.reason}`);
});
}
};
function setupRaven() {
if (pkg.irccloud.sentry_dsn) {
const _Raven = require('raven');
_Raven.on('error', (e) => {
log.error('Raven error', e);
});
raven_config().then((config) => {
_Raven.config(pkg.irccloud.sentry_dsn, config);
Raven = _Raven;
});
ipcMain.on('set-user', (event, sessionUser) => {
user = sessionUser;
});
}
}