Skip to content

Commit 108ad22

Browse files
set user ID (anonymized) in Sentry for cloud
1 parent 4a10017 commit 108ad22

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as Sentry from '@sentry/vue'
2+
3+
import { app } from '../../../scripts/app'
4+
5+
app.registerExtension({
6+
name: 'Comfy.Cloud.Sentry',
7+
onAuthUserResolved: (user, _app) => {
8+
// https://docs.sentry.io/platforms/javascript/apis/#setUser
9+
Sentry.setUser({
10+
id: user.id
11+
})
12+
}
13+
})

src/extensions/core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './clipspace'
2+
import './cloud/sentry'
23
import './contextMenuFilter'
34
import './dynamicPrompts'
45
import './editAttention'

0 commit comments

Comments
 (0)