Skip to content

Commit 85e7d15

Browse files
committed
Sentry config fixes for dashboard (#5056)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR updates the configuration for `Sentry` in the `next.config.js` file and modifies the `turbo.json` to include an environment variable for `SENTRY_AUTH_TOKEN`. It also refines the `Sentry` setup options for better functionality and logging. ### Detailed summary - Added `"env": ["SENTRY_AUTH_TOKEN"]` to `turbo.json`. - Updated `Sentry` configuration in `apps/dashboard/next.config.js`: - Changed `silent` from `true` to `false`. - Added `authToken: process.env.SENTRY_AUTH_TOKEN`. - Retained other `Sentry` options with no changes. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 3a141e7 commit 85e7d15

File tree

2 files changed

+41
-44
lines changed

2 files changed

+41
-44
lines changed

apps/dashboard/next.config.js

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ const moduleExports = {
167167
};
168168

169169
const { withSentryConfig } = require("@sentry/nextjs");
170-
171170
const { withPlausibleProxy } = require("next-plausible");
172171

173172
// we only want sentry on production environments
@@ -183,48 +182,45 @@ module.exports = withBundleAnalyzer(
183182
customDomain: "https://pl.thirdweb.com",
184183
scriptName: "pl",
185184
})(
186-
wSentry(
187-
moduleExports,
188-
{
189-
// For all available options, see:
190-
// https://github.com/getsentry/sentry-webpack-plugin#options
191-
192-
// Suppresses source map uploading logs during build
193-
silent: true,
194-
org: "thirdweb-dev",
195-
project: "dashboard",
196-
},
197-
{
198-
// For all available options, see:
199-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
200-
201-
// Upload a larger set of source maps for prettier stack traces (increases build time)
202-
widenClientFileUpload: true,
203-
204-
// Transpiles SDK to be compatible with IE11 (increases bundle size)
205-
transpileClientSDK: false,
206-
207-
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
208-
tunnelRoute: "/err",
209-
210-
// Hides source maps from generated client bundles
211-
hideSourceMaps: true,
212-
213-
// Automatically tree-shake Sentry logger statements to reduce bundle size
214-
disableLogger: true,
215-
216-
// Enables automatic instrumentation of Vercel Cron Monitors.
217-
// See the following for more information:
218-
// https://docs.sentry.io/product/crons/
219-
// https://vercel.com/docs/cron-jobs
220-
automaticVercelMonitors: false,
221-
222-
/**
223-
* Disables the Sentry Webpack plugin on the server.
224-
* See: https://github.com/getsentry/sentry-javascript/issues/10468#issuecomment-2004710692
225-
*/
226-
disableServerWebpackPlugin: true,
227-
},
228-
),
185+
wSentry(moduleExports, {
186+
// For all available options, see:
187+
// https://github.com/getsentry/sentry-webpack-plugin#options
188+
189+
org: "thirdweb-dev",
190+
project: "dashboard",
191+
// An auth token is required for uploading source maps.
192+
authToken: process.env.SENTRY_AUTH_TOKEN,
193+
// Suppresses source map uploading logs during build
194+
silent: false,
195+
// For all available options, see:
196+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
197+
198+
// Upload a larger set of source maps for prettier stack traces (increases build time)
199+
widenClientFileUpload: true,
200+
201+
// Transpiles SDK to be compatible with IE11 (increases bundle size)
202+
transpileClientSDK: false,
203+
204+
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
205+
tunnelRoute: "/err",
206+
207+
// Hides source maps from generated client bundles
208+
hideSourceMaps: true,
209+
210+
// Automatically tree-shake Sentry logger statements to reduce bundle size
211+
disableLogger: true,
212+
213+
// Enables automatic instrumentation of Vercel Cron Monitors.
214+
// See the following for more information:
215+
// https://docs.sentry.io/product/crons/
216+
// https://vercel.com/docs/cron-jobs
217+
automaticVercelMonitors: false,
218+
219+
/**
220+
* Disables the Sentry Webpack plugin on the server.
221+
* See: https://github.com/getsentry/sentry-javascript/issues/10468#issuecomment-2004710692
222+
*/
223+
disableServerWebpackPlugin: true,
224+
}),
229225
),
230226
);

turbo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"dependsOn": ["^build"]
1616
},
1717
"thirdweb-dashboard#build": {
18+
"env": ["SENTRY_AUTH_TOKEN"],
1819
"outputs": [".next/**", "!.next/cache/**"],
1920
"dependsOn": ["^build"]
2021
},

0 commit comments

Comments
 (0)