Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!analytics) {
return;
}
const dsn = isProduction ? 'https://b0fb75c38ef4487dbf742f79c4ba62d2@sentry.servarr.com/12' :
'https://da610619280249f891ec3ee306906793@sentry.servarr.com/13';
sentry.init({
dsn,
environment: branch,
release,
sendDefaultPii: true,
beforeSend: cleanseData,
integrations: [
new Integrations.RewriteFrames({ iteratee: stripUrlBase }),
new Integrations.Dedupe()
]
});
sentry.configureScope((scope) => {
scope.setUser({ username: userHash });
scope.setTag('version', version);
scope.setTag('production', isProduction);
});
return createMiddleware();
}