Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Prefer env var over global
if (process.env.SENTRY_RELEASE) {
options.release = process.env.SENTRY_RELEASE;
}
// This supports the variable that sentry-webpack-plugin injects
else if (global.SENTRY_RELEASE && global.SENTRY_RELEASE.id) {
options.release = global.SENTRY_RELEASE.id;
}
}
if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {
options.environment = process.env.SENTRY_ENVIRONMENT;
}
if (domain.active) {
setHubOnCarrier(getMainCarrier(), getCurrentHub());
}
initAndBind(NodeClient, options);
}