Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 6226899

Browse files
authored
feat: sentry integration (#9187)
1 parent 0f26554 commit 6226899

8 files changed

+33883
-15036
lines changed

Diff for: .github/workflows/vercel-preview.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77
push:
88
branches:
9-
- premium3
9+
- feat-sentry-wizard
1010

1111
jobs:
1212
deploy:

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ test-results/
3838

3939
# vscode
4040
.vscode
41+
42+
# Sentry Auth Token
43+
.sentryclirc

Diff for: next.config.mjs

+32-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { withSentryConfig } from "@sentry/nextjs";
12
import remarkGfm from "remark-gfm";
23
import remarkPrism from "remark-prism";
34
import createMDX from "@next/mdx";
@@ -48,4 +49,34 @@ const withMDX = createMDX({
4849
},
4950
});
5051

51-
export default withMDX(nextConfig);
52+
export default withSentryConfig(
53+
withMDX(nextConfig),
54+
{
55+
// For all available options, see:
56+
// https://github.com/getsentry/sentry-webpack-plugin#options
57+
58+
// Suppresses source map uploading logs during build
59+
silent: true,
60+
org: process.env.SENTRY_ORG,
61+
project: process.env.SENTRY_PROJECT,
62+
},
63+
{
64+
// For all available options, see:
65+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
66+
67+
// Upload a larger set of source maps for prettier stack traces (increases build time)
68+
widenClientFileUpload: true,
69+
70+
// Transpiles SDK to be compatible with IE11 (increases bundle size)
71+
transpileClientSDK: true,
72+
73+
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
74+
tunnelRoute: "/monitoring",
75+
76+
// Hides source maps from generated client bundles
77+
hideSourceMaps: true,
78+
79+
// Automatically tree-shake Sentry logger statements to reduce bundle size
80+
disableLogger: true,
81+
},
82+
);

0 commit comments

Comments
 (0)