From 8f0214428d12f7cd65881ff28ff98a5dcaeb89e8 Mon Sep 17 00:00:00 2001 From: Alec Ananian <1013230+alecananian@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:00:23 +0100 Subject: [PATCH] api: add sentry user logging on login endpoint --- apps/api/src/routes/auth.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/api/src/routes/auth.ts b/apps/api/src/routes/auth.ts index 1bee0e91..e3d06c6f 100644 --- a/apps/api/src/routes/auth.ts +++ b/apps/api/src/routes/auth.ts @@ -1,3 +1,4 @@ +import * as Sentry from "@sentry/node"; import { DEFAULT_TDK_CHAIN_ID, type UserContext, @@ -197,6 +198,11 @@ export const authRoutes = thirdwebUser = thirdwebUserDetails; } + Sentry.setUser({ + id: userId, + username: address, + }); + const { emailAddresses, externalWalletAddresses } = parseThirdwebUserLinkedAccounts(thirdwebUser); const [user, profile, legacyProfiles] = await Promise.all([