Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
install() {
// we have to remove the sampleRate if native client is available
// otherwise we will sample twice
if (Sentry.isNativeClientAvailable() && this.options.sampleRate !== undefined) {
Raven._globalOptions.sampleRate = 1;
}
Raven.install();
Raven.addPlugin(
require('./raven-plugin'),
{
nativeClientAvailable: Sentry.isNativeClientAvailable(),
handlePromiseRejection: this.options.handlePromiseRejection
},
data => {
if (Sentry.options.internal) {
data.dist = Sentry.options.internal.dist;
}
}
);
if (Sentry.isNativeClientAvailable()) {
// We overwrite the default transport handler when the native
}
// Public DSN (without private key)
if (!_options.public_dsn || !_options.public_dsn.length) {
_options.public_dsn = _options.dsn.replace(/:\w+@/, '@')
}
// config raven
Raven.config(_options.dsn, _options.config)
if (!_options.disableAutoReport) {
Raven.addPlugin(RavenVue, Vue)
}
// install Raven
Raven.install()
// add raven instance
Vue.prototype.$raven = Raven
}