We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5ff88b commit b568be3Copy full SHA for b568be3
src/errors.ts
@@ -1,3 +1,5 @@
1
+import { randomUUID } from 'crypto';
2
+
3
const DEV_MODE = process.env.HTK_DEV === 'true';
4
5
import * as Sentry from '@sentry/electron';
@@ -19,6 +21,14 @@ if (!DEV_MODE) {
19
21
})
20
22
]
23
});
24
25
+ Sentry.configureScope((scope) => {
26
+ // We use a random id to distinguish between many errors in one session vs
27
+ // one error in many sessions. This isn't persisted and can't be used to
28
+ // identify anybody between sessions.
29
+ const randomId = randomUUID();
30
+ scope.setUser({ id: randomId, username: `anon-${randomId}` });
31
+ });
32
}
33
34
export function logError(error: Error | string, fingerprint?: string[]) {
0 commit comments