0.2.1 • Published 5 years ago
sentry-electron-user-id v0.2.1
sentry-electron-user-id
Assigns a unique user id to each app install
If you disable storage of IP addresses in Sentry, you'll notice that you no longer get a count of the number of users the issue is affecting. IP address can also be an unreliable way to to determine distinct users, especially if you have a large number of users behind a corporate firewall.
Example usage
In both Electron processes, run the following code:
const Sentry = require('@sentry/electron');
const { ElectronUserID } = require('sentry-electron-user-id');
Sentry.init({
dsn: '__YOUR_DSN__',
integrations: integrations => [...integrations, new ElectronUserID()],
});
If you ever want to renew the user ID, for example if a user would like to restore their anonymity after supplying their unique ID to technical support. From any process, simply run:
const { renewUserId } = require('sentry-electron-user-id');
renewUserId();