Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (Ctx.getCurrentUserId()) {
userContext.user_id = Ctx.getCurrentUserId();
// TODO: do we want to parametrize the old behaviour?
// var user = Ctx.getCurrentUser();
// userContext.name = user.get('name');
// userContext.email = user.get('preferred_email');
}
Raven.setUserContext(userContext);
window.Raven = Raven;
require('raven-js/plugins/console.js');
}
else {
//Disables raven for development
Raven.config(false);
Raven.debug = true;
}
var router = new Router();
var collectionManager = new CollectionManager();
var socket = collectionManager.getConnectedSocketPromise();
window.Ctx = Ctx;
App.start();
constructor(dsn, options) {
if (dsn.constructor !== String) {
throw new Error('SentryClient: A DSN must be provided');
}
this._dsn = dsn;
this.options = {
allowSecretKey: true,
allowDuplicates: Sentry.isNativeClientAvailable()
};
Object.assign(this.options, options);
Raven.config(dsn, this.options);
if (options.logLevel >= SentryLog.Debug) {
Raven.debug = true;
}
}