Skip to content

Commit 0e8f499

Browse files
committedJul 31, 2024
pro tip
1 parent ab85816 commit 0e8f499

File tree

2 files changed

+34
-25
lines changed

2 files changed

+34
-25
lines changed
 

‎next.config.mjs

+28-25
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
1-
import {withSentryConfig} from '@sentry/nextjs';
1+
import { withSentryConfig } from '@sentry/nextjs';
22
/** @type {import('next').NextConfig} */
33
const nextConfig = {};
44

55
export default withSentryConfig(nextConfig, {
6-
// For all available options, see:
7-
// https://github.com/getsentry/sentry-webpack-plugin#options
6+
// For all available options, see:
7+
// https://github.com/getsentry/sentry-webpack-plugin#options
88

9-
org: "alex-org-fm",
10-
project: "javascript-nextjs",
9+
org: "alex-org-fm",
10+
project: "javascript-nextjs",
1111

12-
// Only print logs for uploading source maps in CI
13-
silent: !process.env.CI,
12+
// Only print logs for uploading source maps in CI
13+
silent: !process.env.CI,
1414

15-
// For all available options, see:
16-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
15+
// For all available options, see:
16+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
1717

18-
// Upload a larger set of source maps for prettier stack traces (increases build time)
19-
widenClientFileUpload: true,
18+
// Upload a larger set of source maps for prettier stack traces (increases build time)
19+
widenClientFileUpload: true,
2020

21-
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
22-
// This can increase your server load as well as your hosting bill.
23-
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
24-
// side errors will fail.
25-
tunnelRoute: "/monitoring",
21+
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
22+
// This can increase your server load as well as your hosting bill.
23+
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
24+
// side errors will fail.
25+
tunnelRoute: "/monitoring",
2626

27-
// Hides source maps from generated client bundles
28-
hideSourceMaps: true,
27+
// Hides source maps from generated client bundles
28+
hideSourceMaps: true,
2929

30-
// Automatically tree-shake Sentry logger statements to reduce bundle size
31-
disableLogger: true,
30+
// Automatically tree-shake Sentry logger statements to reduce bundle size
31+
disableLogger: true,
3232

33-
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
34-
// See the following for more information:
35-
// https://docs.sentry.io/product/crons/
36-
// https://vercel.com/docs/cron-jobs
37-
automaticVercelMonitors: true,
33+
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
34+
// See the following for more information:
35+
// https://docs.sentry.io/product/crons/
36+
// https://vercel.com/docs/cron-jobs
37+
automaticVercelMonitors: true,
38+
unstable_sentryWebpackPluginOptions: {
39+
applicationKey: 'sentry-demo'
40+
}
3841
});

‎sentry.client.config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,11 @@ Sentry.init({
2626
maskAllText: true,
2727
blockAllMedia: true,
2828
}),
29+
Sentry.thirdPartyErrorFilterIntegration({
30+
filterKeys: [
31+
'sentry-demo'
32+
],
33+
behaviour: "apply-tag-if-contains-third-party-frames"
34+
})
2935
],
3036
});

0 commit comments

Comments
 (0)