Skip to content

Open-source status page, incident response and uptime monitoring

chore: sentry (#1493)

Maximilian Kaske81943ee04e13
diff --git a/apps/dashboard/.env.example b/apps/dashboard/.env.example
index 5a634cddd..e137ee2d4 100644
--- a/apps/dashboard/.env.example
+++ b/apps/dashboard/.env.example
@@ -37,6 +37,7 @@ VERCEL_AUTH_BEARER_TOKEN=
NEXT_PUBLIC_URL=
NEXT_PUBLIC_SENTRY_DSN=''
+SENTRY_AUTH_TOKEN=''
# Unkey
UNKEY_API_ID=
diff --git a/apps/dashboard/next.config.ts b/apps/dashboard/next.config.ts
index 1d4cd972c..bca911746 100644
--- a/apps/dashboard/next.config.ts
+++ b/apps/dashboard/next.config.ts
@@ -22,8 +22,9 @@ module.exports = withSentryConfig(
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
- // Suppresses source map uploading logs during build
- silent: true,
+ // Only print logs for uploading source maps in CI
+ // Set to `true` to suppress logs
+ silent: !process.env.CI,
org: "openstatus",
project: "openstatus",
@@ -32,15 +33,15 @@ module.exports = withSentryConfig(
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
+ // Pass the auth token
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: false,
- // Hides source maps from generated client bundles
- hideSourceMaps: true,
-
// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
},
diff --git a/apps/status-page/.env.example b/apps/status-page/.env.example
index 13be461d6..5dfad93e7 100644
--- a/apps/status-page/.env.example
+++ b/apps/status-page/.env.example
@@ -10,6 +10,7 @@ DATABASE_URL=http://127.0.0.1:8080
DATABASE_AUTH_TOKEN=any-token
NEXT_PUBLIC_SENTRY_DSN=''
+SENTRY_AUTH_TOKEN=''
# used for contributions to fill the monitor tracker with data
NOOP_UPTIME="true"
diff --git a/apps/status-page/next.config.ts b/apps/status-page/next.config.ts
index 8f913b8a4..101b12217 100644
--- a/apps/status-page/next.config.ts
+++ b/apps/status-page/next.config.ts
@@ -57,8 +57,9 @@ module.exports = withSentryConfig(
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
- // Suppresses source map uploading logs during build
- silent: true,
+ // Only print logs for uploading source maps in CI
+ // Set to `true` to suppress logs
+ silent: !process.env.CI,
org: "openstatus",
project: "openstatus",
@@ -67,15 +68,15 @@ module.exports = withSentryConfig(
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
+ // Pass the auth token
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: false,
- // Hides source maps from generated client bundles
- hideSourceMaps: true,
-
// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
},
diff --git a/apps/web/.env.example b/apps/web/.env.example
index 5a634cddd..e137ee2d4 100644
--- a/apps/web/.env.example
+++ b/apps/web/.env.example
@@ -37,6 +37,7 @@ VERCEL_AUTH_BEARER_TOKEN=
NEXT_PUBLIC_URL=
NEXT_PUBLIC_SENTRY_DSN=''
+SENTRY_AUTH_TOKEN=''
# Unkey
UNKEY_API_ID=
diff --git a/apps/web/instrumentation-client.ts.ts b/apps/web/instrumentation-client.ts
similarity index 100%
rename from apps/web/instrumentation-client.ts.ts
rename to apps/web/instrumentation-client.ts
diff --git a/apps/web/next.config.js b/apps/web/next.config.js
index aedc8914a..5a86ee503 100644
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@ -167,8 +167,9 @@ module.exports = withSentryConfig(
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
- // Suppresses source map uploading logs during build
- silent: true,
+ // Only print logs for uploading source maps in CI
+ // Set to `true` to suppress logs
+ silent: !process.env.CI,
org: "openstatus",
project: "openstatus",
@@ -177,15 +178,15 @@ module.exports = withSentryConfig(
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
+ // Pass the auth token
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: false,
- // Hides source maps from generated client bundles
- hideSourceMaps: true,
-
// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
},