feat: improved observability on api v1 and webapp (#20302)
* feat: associate errors to users on api v1 * Added webapp * Update layout.tsx * Update captureUserId.ts
This commit is contained in:
1 parent
0ec701f9e6
commit
19712f62e3
4 files changed
+29
-5
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { setUser as SentrySetUser } from "@sentry/nextjs";
|
||||
import type { Session } from "next-auth";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
@@ -154,6 +155,8 @@ export const isAuthed = middleware(async ({ ctx, next }) => {
|
||||
throw new TRPCError({ code: "UNAUTHORIZED" });
|
||||
}
|
||||
|
||||
SentrySetUser({ id: user.id });
|
||||
|
||||
return next({
|
||||
ctx: { user, session },
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user