From 26a76d1ab7276b42963d361c58f79b4635c15ea1 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Fri, 20 Dec 2024 12:14:13 -0800 Subject: [PATCH] Report to sentry if experimentationId does not match --- src/app/layout.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index fa134ec576..223af998da 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -20,6 +20,7 @@ import { getExperimentationId } from "./functions/server/getExperimentationId"; import { getExperiments } from "./functions/server/getExperiments"; import { getCountryCode } from "./functions/server/getCountryCode"; import { ExperimentsProvider } from "../contextProviders/experiments"; +import * as Sentry from "@sentry/nextjs"; const inter = Inter({ subsets: ["latin"], variable: "--font-inter" }); @@ -71,6 +72,13 @@ export default async function RootLayout({ previewMode: nimbusPreviewMode === "true", }); + const nimbus_user_id = experimentData["Enrollments"].nimbus_user_id; + if (nimbus_user_id !== experimentationId) { + Sentry.captureMessage( + `Nimbus user ID from Cirrus: [${nimbus_user_id}] did not match experimentationId: [${experimentationId}]`, + ); + } + return (