diff options
Diffstat (limited to 'src/gateway/events/Message.ts')
-rw-r--r-- | src/gateway/events/Message.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts index 4ed715b2..204f0025 100644 --- a/src/gateway/events/Message.ts +++ b/src/gateway/events/Message.ts @@ -53,11 +53,16 @@ export async function Message(this: WebSocket, buffer: WS.Data) { try { var ret = await OPCodeHandler.call(this, data); - transaction?.finish(); + Sentry.withScope((scope) => { + scope.setSpan(transaction); + scope.setUser({ id: this.user_id }); + transaction?.finish(); + }); return ret; } catch (error) { Sentry.withScope((scope) => { scope.setSpan(transaction); + if (this.user_id) scope.setUser({ id: this.user_id }); Sentry.captureException(error); }); transaction?.finish(); |