@@ -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`;
@@ -429,30 +433,6 @@ exports[`common > should update compose.yml 1`] = `
429433 " interval: 1s",
430434 " timeout: 5s",
431435 " retries: 10",
432- " jaeger:",
433- " image: jaegertracing/all-in-one",
434- " ports:",
435- " # https://www.jaegertracing.io/docs/1.6/getting-started/#all-in-one-docker-image",
436- " # frontend",
437- " - 16686:16686",
438- " - 14268",
439- " - 14250",
440- " environment:",
441- " - METRICS_STORAGE_TYPE=prometheus",
442- " - PROMETHEUS_QUERY_SUPPORT_SPANMETRICS_CONNECTOR=true",
443- " - COLLECTOR_OTLP_ENABLED=true",
444- " # don't use contrib on prod",
445- " # https://opentelemetry.io/blog/2024/otel-collector-anti-patterns/#3--not-using-the-right-collector-distribution-or-not-building-your-own-distribution",
446- " otel-collector:",
447- " image: otel/opentelemetry-collector-contrib",
448- " command: [\\"--config=/conf/otel-collector-config.yml\\"]",
449- " volumes:",
450- " - ./otel-collector-config.yml:/conf/otel-collector-config.yml",
451- " ports:",
452- " - 13133:13133 # health_check extension",
453- " - 4317:4317 # OTLP gRPC receiver",
454- " depends_on:",
455- " - jaeger",
456436 ""
457437]
458438`;
@@ -473,6 +453,8 @@ exports[`common > should update dependencies 1`] = `
473453 "@opentelemetry/semantic-conventions",
474454 "@prisma/client",
475455 "@prisma/instrumentation",
456+ "@sentry/nextjs",
457+ "@sentry/profiling-node",
476458 "clsx",
477459 "next",
478460 "next-auth",
@@ -798,6 +780,11 @@ exports[`common > should update env.ts 1`] = `
798780 " STRIPE_PRICE_ID: z.string().min(1),",
799781 " STRIPE_SECRET_KEY: z.string().min(1),",
800782 " STRIPE_WEBHOOK_SECRET: z.string().min(1),",
783+ "",
784+ " SENTRY_ORG: z.string().min(1).optional().or(z.literal(\\"\\")),",
785+ " SENTRY_PROJECT: z.string().min(1).optional().or(z.literal(\\"\\")),",
786+ " SENTRY_AUTH_TOKEN: z.string().min(1).optional().or(z.literal(\\"\\")),",
787+ " NEXT_PUBLIC_SENTRY_DSN: z.string().min(1).optional().or(z.literal(\\"\\")),",
801788 "});",
802789 "",
803790 "const runtimeEnv = z.object({});",
@@ -847,6 +834,7 @@ exports[`common > should update knip.config.ts 1`] = `
847834
848835exports[`common > should update next.config.ts 1`] = `
849836[
837+ "import { withSentryConfig } from \\"@sentry/nextjs\\";",
850838 "import type { NextConfig } from \\"next\\";",
851839 "import { config } from \\"./env\\";",
852840 "",
@@ -880,6 +868,15 @@ exports[`common > should update next.config.ts 1`] = `
880868 " },",
881869 " ],",
882870 " },",
871+ " {",
872+ " source: \\"/:path*\\",",
873+ " headers: [",
874+ " {",
875+ " key: \\"Document-Policy\\",",
876+ " value: \\"js-profiling\\",",
877+ " },",
878+ " ],",
879+ " },",
883880 " ];",
884881 " },",
885882 " images: {",
@@ -910,7 +907,17 @@ exports[`common > should update next.config.ts 1`] = `
910907 " ],",
911908 "};",
912909 "",
913- "export default nextConfig;",
910+ "export default withSentryConfig(nextConfig, {",
911+ " org: process.env.SENTRY_ORG,",
912+ " project: process.env.SENTRY_PROJECT,",
913+ " silent: !process.env.CI,",
914+ " widenClientFileUpload: true,",
915+ " authToken: process.env.SENTRY_AUTH_TOKEN,",
916+ " disableLogger: true,",
917+ " reactComponentAnnotation: {",
918+ " enabled: true,",
919+ " },",
920+ "});",
914921 ""
915922]
916923`;
@@ -1068,6 +1075,7 @@ exports[`common > should update src/app/layout.tsx 1`] = `
10681075 "import { Inter } from \\"next/font/google\\";",
10691076 "import { Footer } from \\"./_components/Footer\\";",
10701077 "import { Header } from \\"./_components/Header\\";",
1078+ "import { SentryProvider } from \\"./_providers/Sentry\\";",
10711079 "import \\"./globals.css\\";",
10721080 "",
10731081 "const inter = Inter({",
@@ -1090,16 +1098,20 @@ exports[`common > should update src/app/layout.tsx 1`] = `
10901098 "",
10911099 "export default function Layout({ children }: LayoutProps<\\"/\\">) {",
10921100 " return (",
1093- " <html lang=\\"en\\">",
1101+ " <html lang=\\"en\\" suppressHydrationWarning >",
10941102 " <body",
1103+ " // Extensions like Grammarly mutate <body> attributes before hydration.",
1104+ " suppressHydrationWarning",
10951105 " className={clsx(",
10961106 " inter.className,",
10971107 " \\"bg-gray-700 text-gray-200 min-h-screen flex flex-col\\",",
10981108 " )}",
10991109 " >",
1100- " <Header />",
1101- " <main className=\\"flex-1\\">{children}</main>",
1102- " <Footer />",
1110+ " <SentryProvider>",
1111+ " <Header />",
1112+ " <main className=\\"flex-1\\">{children}</main>",
1113+ " <Footer />",
1114+ " </SentryProvider>",
11031115 " </body>",
11041116 " </html>",
11051117 " );",
0 commit comments