From 01cc5d8c482b0df5cf41b5d1f08a1de86fbc2ff6 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 28 Oct 2024 21:36:39 +0000 Subject: [PATCH] testing sentry stuff --- bun.lockb | Bin 369032 -> 369032 bytes projects/website/next.config.ts | 60 +++++++++++++++-------- projects/website/package.json | 2 +- projects/website/sentry.client.config.ts | 22 +++++++-- projects/website/sentry.edge.config.ts | 9 ++-- projects/website/sentry.server.config.ts | 9 ++-- 6 files changed, 71 insertions(+), 31 deletions(-) diff --git a/bun.lockb b/bun.lockb index 8bc7658d2af0384edbae416092b409ce1f277f6f..2606a3e54e69ea3d945052f9195e914272ace736 100755 GIT binary patch delta 44 ycmeA;EY@*Ytf7Umg=q`(?hULAATa&F2IiCOjB)0A271Qr6E-q$pRkeT$9n);-4Id$ delta 44 xcmeA;EY@*Ytf7Umg=q`(?hUMZ#-@4((+_N5KFQ9+00!+7HZpIYu#x4*djMfk5Ay&3 diff --git a/projects/website/next.config.ts b/projects/website/next.config.ts index a410d51..d3bff9c 100644 --- a/projects/website/next.config.ts +++ b/projects/website/next.config.ts @@ -41,24 +41,42 @@ const withBundleAnalyzer = nextBundleAnalyzer({ enabled: process.env.ANALYZE === "true", }); -export default withBundleAnalyzer( - withSentryConfig(nextConfig, { - org: "scoresaber-reloaded", - project: "frontend", - sentryUrl: "https://glitchtip.fascinated.cc/", - silent: !process.env.CI, - reactComponentAnnotation: { - enabled: true, - }, - tunnelRoute: "/monitoring", - hideSourceMaps: true, - disableLogger: true, - sourcemaps: { - disable: true, - }, - release: { - create: false, - finalize: false, - }, - }) -); +export default withSentryConfig(withBundleAnalyzer(nextConfig), { + // For all available options, see: + // https://github.com/getsentry/sentry-webpack-plugin#options + + org: "fascinatedcc", + project: "scoresaber-reloaded", + + // Only print logs for uploading source maps in CI + silent: !process.env.CI, + + // For all available options, see: + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ + + // Upload a larger set of source maps for prettier stack traces (increases build time) + widenClientFileUpload: true, + + // Automatically annotate React components to show their full name in breadcrumbs and session replay + reactComponentAnnotation: { + enabled: true, + }, + + // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. + // This can increase your server load as well as your hosting bill. + // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- + // side errors will fail. + tunnelRoute: "/monitoring", + + // Hides source maps from generated client bundles + hideSourceMaps: true, + + // Automatically tree-shake Sentry logger statements to reduce bundle size + disableLogger: true, + + // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) + // See the following for more information: + // https://docs.sentry.io/product/crons/ + // https://vercel.com/docs/cron-jobs + automaticVercelMonitors: true, +}); diff --git a/projects/website/package.json b/projects/website/package.json index 82469b7..8947b8b 100644 --- a/projects/website/package.json +++ b/projects/website/package.json @@ -24,7 +24,7 @@ "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-toast": "^1.2.1", "@radix-ui/react-tooltip": "^1.1.2", - "@sentry/nextjs": "8.35.0", + "@sentry/nextjs": "8", "@ssr/common": "workspace:*", "@tanstack/react-query": "^5.55.4", "@uidotdev/usehooks": "^2.4.1", diff --git a/projects/website/sentry.client.config.ts b/projects/website/sentry.client.config.ts index 2943413..365662b 100644 --- a/projects/website/sentry.client.config.ts +++ b/projects/website/sentry.client.config.ts @@ -5,8 +5,24 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ - dsn: "https://69aed8b4a32e45db8fcb1b4285b4370f@glitchtip.fascinated.cc/13", - tracesSampleRate: 0.1, + dsn: "https://2b0d6c2e72099dee7db2ce9c030651bd@o4508202509205504.ingest.de.sentry.io/4508202511302736", + + // Add optional integrations for additional features + integrations: [ + Sentry.replayIntegration(), + ], + + // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. + tracesSampleRate: 1, + + // Define how likely Replay events are sampled. + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + + // Define how likely Replay events are sampled when an error occurs. + replaysOnErrorSampleRate: 1.0, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, - enabled: process.env.NODE_ENV === "production", }); diff --git a/projects/website/sentry.edge.config.ts b/projects/website/sentry.edge.config.ts index 1f7de40..4670727 100644 --- a/projects/website/sentry.edge.config.ts +++ b/projects/website/sentry.edge.config.ts @@ -6,8 +6,11 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ - dsn: "https://69aed8b4a32e45db8fcb1b4285b4370f@glitchtip.fascinated.cc/13", - tracesSampleRate: 0.1, + dsn: "https://2b0d6c2e72099dee7db2ce9c030651bd@o4508202509205504.ingest.de.sentry.io/4508202511302736", + + // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. + tracesSampleRate: 1, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, - enabled: process.env.NODE_ENV === "production", }); diff --git a/projects/website/sentry.server.config.ts b/projects/website/sentry.server.config.ts index b2bb81e..2537fc0 100644 --- a/projects/website/sentry.server.config.ts +++ b/projects/website/sentry.server.config.ts @@ -5,8 +5,11 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ - dsn: "https://69aed8b4a32e45db8fcb1b4285b4370f@glitchtip.fascinated.cc/13", - tracesSampleRate: 0.1, + dsn: "https://2b0d6c2e72099dee7db2ce9c030651bd@o4508202509205504.ingest.de.sentry.io/4508202511302736", + + // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. + tracesSampleRate: 1, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, - enabled: process.env.NODE_ENV === "production", });