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,6 +1,16 @@
|
||||
import { setUser as SentrySetUser } from "@sentry/nextjs";
|
||||
import { cookies, headers } from "next/headers";
|
||||
import React from "react";
|
||||
|
||||
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
||||
import Shell from "@calcom/features/shell/Shell";
|
||||
|
||||
const Layout = ({ children }: { children: React.ReactNode }) => {
|
||||
import { buildLegacyRequest } from "@lib/buildLegacyCtx";
|
||||
|
||||
const Layout = async ({ children }: { children: React.ReactNode }) => {
|
||||
const session = await getServerSession({ req: buildLegacyRequest(await headers(), await cookies()) });
|
||||
if (session?.user?.id) SentrySetUser({ id: session.user.id });
|
||||
|
||||
return <Shell withoutMain={true}>{children}</Shell>;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user