@@ -22,7 +22,6 @@ exports[`common > should put files 1`] = `
2222 "internal-tests-output-common/knip.config.ts",
2323 "internal-tests-output-common/lefthook.yml",
2424 "internal-tests-output-common/next.config.ts",
25- "internal-tests-output-common/otel-collector-config.yml",
2625 "internal-tests-output-common/package.json",
2726 "internal-tests-output-common/playwright.config.ts",
2827 "internal-tests-output-common/pnpm-lock.yaml",
@@ -82,6 +81,11 @@ exports[`common > should update .env.sample 1`] = `
8281 "STRIPE_SECRET_KEY=xxxx",
8382 "STRIPE_WEBHOOK_SECRET=xxxx",
8483 "STRIPE_PRICE_ID=xxxx",
84+ "",
85+ "SENTRY_ORG=",
86+ "SENTRY_PROJECT=",
87+ "SENTRY_AUTH_TOKEN=",
88+ "NEXT_PUBLIC_SENTRY_DSN=",
8589 ""
8690]
8791`;
@@ -427,30 +431,6 @@ exports[`common > should update compose.yml 1`] = `
427431 " interval: 1s",
428432 " timeout: 5s",
429433 " retries: 10",
430- " jaeger:",
431- " image: jaegertracing/all-in-one",
432- " ports:",
433- " # https://www.jaegertracing.io/docs/1.6/getting-started/#all-in-one-docker-image",
434- " # frontend",
435- " - 16686:16686",
436- " - 14268",
437- " - 14250",
438- " environment:",
439- " - METRICS_STORAGE_TYPE=prometheus",
440- " - PROMETHEUS_QUERY_SUPPORT_SPANMETRICS_CONNECTOR=true",
441- " - COLLECTOR_OTLP_ENABLED=true",
442- " # don't use contrib on prod",
443- " # https://opentelemetry.io/blog/2024/otel-collector-anti-patterns/#3--not-using-the-right-collector-distribution-or-not-building-your-own-distribution",
444- " otel-collector:",
445- " image: otel/opentelemetry-collector-contrib",
446- " command: [\\"--config=/conf/otel-collector-config.yml\\"]",
447- " volumes:",
448- " - ./otel-collector-config.yml:/conf/otel-collector-config.yml",
449- " ports:",
450- " - 13133:13133 # health_check extension",
451- " - 4317:4317 # OTLP gRPC receiver",
452- " depends_on:",
453- " - jaeger",
454434 ""
455435]
456436`;
@@ -471,6 +451,8 @@ exports[`common > should update dependencies 1`] = `
471451 "@opentelemetry/semantic-conventions",
472452 "@prisma/client",
473453 "@prisma/instrumentation",
454+ "@sentry/nextjs",
455+ "@sentry/profiling-node",
474456 "clsx",
475457 "next",
476458 "next-auth",
@@ -795,6 +777,11 @@ exports[`common > should update env.ts 1`] = `
795777 " STRIPE_PRICE_ID: z.string().min(1),",
796778 " STRIPE_SECRET_KEY: z.string().min(1),",
797779 " STRIPE_WEBHOOK_SECRET: z.string().min(1),",
780+ "",
781+ " SENTRY_ORG: z.string().min(1).optional().or(z.literal(\\"\\")),",
782+ " SENTRY_PROJECT: z.string().min(1).optional().or(z.literal(\\"\\")),",
783+ " SENTRY_AUTH_TOKEN: z.string().min(1).optional().or(z.literal(\\"\\")),",
784+ " NEXT_PUBLIC_SENTRY_DSN: z.string().min(1).optional().or(z.literal(\\"\\")),",
798785 "});",
799786 "",
800787 "const runtimeEnv = z.object({});",
@@ -844,6 +831,7 @@ exports[`common > should update knip.config.ts 1`] = `
844831
845832exports[`common > should update next.config.ts 1`] = `
846833[
834+ "import { withSentryConfig } from \\"@sentry/nextjs\\";",
847835 "import type { NextConfig } from \\"next\\";",
848836 "import { config } from \\"./env\\";",
849837 "",
@@ -877,6 +865,15 @@ exports[`common > should update next.config.ts 1`] = `
877865 " },",
878866 " ],",
879867 " },",
868+ " {",
869+ " source: \\"/:path*\\",",
870+ " headers: [",
871+ " {",
872+ " key: \\"Document-Policy\\",",
873+ " value: \\"js-profiling\\",",
874+ " },",
875+ " ],",
876+ " },",
880877 " ];",
881878 " },",
882879 " images: {",
@@ -907,7 +904,17 @@ exports[`common > should update next.config.ts 1`] = `
907904 " ],",
908905 "};",
909906 "",
910- "export default nextConfig;",
907+ "export default withSentryConfig(nextConfig, {",
908+ " org: process.env.SENTRY_ORG,",
909+ " project: process.env.SENTRY_PROJECT,",
910+ " silent: !process.env.CI,",
911+ " widenClientFileUpload: true,",
912+ " authToken: process.env.SENTRY_AUTH_TOKEN,",
913+ " disableLogger: true,",
914+ " reactComponentAnnotation: {",
915+ " enabled: true,",
916+ " },",
917+ "});",
911918 ""
912919]
913920`;
@@ -1065,6 +1072,7 @@ exports[`common > should update src/app/layout.tsx 1`] = `
10651072 "import { Inter } from \\"next/font/google\\";",
10661073 "import { Footer } from \\"./_components/Footer\\";",
10671074 "import { Header } from \\"./_components/Header\\";",
1075+ "import { SentryProvider } from \\"./_providers/Sentry\\";",
10681076 "import \\"./globals.css\\";",
10691077 "",
10701078 "const inter = Inter({",
@@ -1085,28 +1093,22 @@ exports[`common > should update src/app/layout.tsx 1`] = `
10851093 " maximumScale: 1,",
10861094 "};",
10871095 "",
1088- <<<<<<< HEAD
10891096 "export default function Layout({ children }: LayoutProps<\\"/\\">) {",
1090- ||||||| parent of da30f8f (refactor: clean up)
1091- "type Props = PropsWithChildren<{",
1092- " dialog: ReactNode;",
1093- "}>;",
1094- "",
1095- "export default function Layout({ dialog, children }: Props) {",
1096- =======
1097- "export default function Layout({ dialog, children }: LayoutProps<\\"/\\">) {",
1098- >>>>>>> da30f8f (refactor: clean up)
10991097 " return (",
1100- " <html lang=\\"en\\">",
1098+ " <html lang=\\"en\\" suppressHydrationWarning >",
11011099 " <body",
1100+ " // Extensions like Grammarly mutate <body> attributes before hydration.",
1101+ " suppressHydrationWarning",
11021102 " className={clsx(",
11031103 " inter.className,",
11041104 " \\"bg-gray-700 text-gray-200 min-h-screen flex flex-col\\",",
11051105 " )}",
11061106 " >",
1107- " <Header />",
1108- " <main className=\\"flex-1\\">{children}</main>",
1109- " <Footer />",
1107+ " <SentryProvider>",
1108+ " <Header />",
1109+ " <main className=\\"flex-1\\">{children}</main>",
1110+ " <Footer />",
1111+ " </SentryProvider>",
11101112 " </body>",
11111113 " </html>",
11121114 " );",
0 commit comments