|
| 1 | +import { withSentryConfig } from '@sentry/nextjs'; |
1 | 2 | import { withBotId } from 'botid/next/config'; |
2 | 3 | import type { NextConfig } from 'next'; |
3 | 4 | import path from 'path'; |
@@ -124,4 +125,40 @@ const config: NextConfig = { |
124 | 125 | }, |
125 | 126 | }; |
126 | 127 |
|
127 | | -export default withBotId(config); |
| 128 | +export default withSentryConfig(withBotId(config), { |
| 129 | + // For all available options, see: |
| 130 | + // https://www.npmjs.com/package/@sentry/webpack-plugin#options |
| 131 | + |
| 132 | + org: "comp-ai", |
| 133 | + |
| 134 | + project: "comp", |
| 135 | + |
| 136 | + // Only print logs for uploading source maps in CI |
| 137 | + silent: !process.env.CI, |
| 138 | + |
| 139 | + // For all available options, see: |
| 140 | + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ |
| 141 | + |
| 142 | + // Upload a larger set of source maps for prettier stack traces (increases build time) |
| 143 | + widenClientFileUpload: true, |
| 144 | + |
| 145 | + // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. |
| 146 | + // This can increase your server load as well as your hosting bill. |
| 147 | + // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- |
| 148 | + // side errors will fail. |
| 149 | + tunnelRoute: "/monitoring", |
| 150 | + |
| 151 | + webpack: { |
| 152 | + // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) |
| 153 | + // See the following for more information: |
| 154 | + // https://docs.sentry.io/product/crons/ |
| 155 | + // https://vercel.com/docs/cron-jobs |
| 156 | + automaticVercelMonitors: true, |
| 157 | + |
| 158 | + // Tree-shaking options for reducing bundle size |
| 159 | + treeshake: { |
| 160 | + // Automatically tree-shake Sentry logger statements to reduce bundle size |
| 161 | + removeDebugLogging: true, |
| 162 | + }, |
| 163 | + }, |
| 164 | +}); |
0 commit comments