From 55eb5513f471261db18d6dc97500676af4cab6e3 Mon Sep 17 00:00:00 2001 From: Aslam Date: Tue, 10 Sep 2024 18:24:39 +0700 Subject: [PATCH] chore(sentry): remove local sentry and use from env (#159) * . * add sentry * prettier * up packages * no edge sentry * chore: remove local sentry and now use form env --------- Co-authored-by: Nikita --- web/.env.example | 3 +++ web/next.config.mjs | 4 +--- web/sentry.client.config.ts | 2 +- web/sentry.server.config.ts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/web/.env.example b/web/.env.example index 8587bc0c..f06d9024 100644 --- a/web/.env.example +++ b/web/.env.example @@ -12,4 +12,7 @@ NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up NEXT_PUBLIC_JAZZ_PEER_URL="wss://" RONIN_TOKEN= + +SENTRY_DSN= +SENTRY_PROJECT= # IGNORE_BUILD_ERRORS=true \ No newline at end of file diff --git a/web/next.config.mjs b/web/next.config.mjs index afb4643a..8be71289 100644 --- a/web/next.config.mjs +++ b/web/next.config.mjs @@ -42,14 +42,12 @@ const webConfig = { const nextConfig = isTauri ? tauriConfig : webConfig -// console.log(`Using ${isTauri ? "Tauri" : "Web"} config`) - export default withSentryConfig(nextConfig, { // For all available options, see: // https://github.com/getsentry/sentry-webpack-plugin#options org: "learn-anything", - project: "website", + project: process.env.SENTRY_PROJECT, sentryUrl: "https://sentry.io/", // Only print logs for uploading source maps in CI diff --git a/web/sentry.client.config.ts b/web/sentry.client.config.ts index 83f4b56c..27056a38 100644 --- a/web/sentry.client.config.ts +++ b/web/sentry.client.config.ts @@ -5,7 +5,7 @@ import * as Sentry from "@sentry/nextjs" Sentry.init({ - dsn: "https://643e210c090ea97f641b7f5fb253f16b@o301266.ingest.us.sentry.io/4507927630118912", + dsn: process.env.SENTRY_DSN, // Add optional integrations for additional features integrations: [Sentry.replayIntegration()], diff --git a/web/sentry.server.config.ts b/web/sentry.server.config.ts index 61484b30..50176680 100644 --- a/web/sentry.server.config.ts +++ b/web/sentry.server.config.ts @@ -5,7 +5,7 @@ import * as Sentry from "@sentry/nextjs" Sentry.init({ - dsn: "https://643e210c090ea97f641b7f5fb253f16b@o301266.ingest.us.sentry.io/4507927630118912", + dsn: process.env.SENTRY_DSN, // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control. tracesSampleRate: 1,