How to use the @sentry/node.setExtras function in @sentry/node

To help you get started, we’ve selected a few @sentry/node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github splash-cli / splash-cli / src / client.js View on Github external
}
		}

		config.set('lastError', null);
		config.set('lastEventId', null);

		return;
	}

	Sentry.init({ dsn: process.env.SENTRY_DSN });

	try {
		const system = getSystemInfos();
		const user = getUserInfo();

		Sentry.setExtras(system);
		Sentry.setUser(user);

		Sentry.setTags({
			OS: system.PLATFORM.OS === 'darwin' ? system.PLATFORM.RELEASE : system.PLATFORM.OS,
			version: system.CLIENT_VERSION,
		});
	} catch (e) {
		errorHandler(e);
	}

	dns.lookup('api.unsplash.com', (error) => {
		if (error && error.code === 'ENOTFOUND') {
			Sentry.captureMessage('No Internet Connection', Sentry.Severity.Warning);
			console.error(chalk.red('\n Please check your internet connection.\n'));
			process.exit(1);
		}