Skip to content

Commit 9424336

Browse files
committed
chore: upgrade Sentry to v9.1.0 and configure project settings
1 parent c9b989d commit 9424336

File tree

8 files changed

+498
-384
lines changed

8 files changed

+498
-384
lines changed

apps/web/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ yarn-error.log*
3232
# typescript
3333
*.tsbuildinfo
3434
next-env.d.ts
35+
36+
# Sentry Config File
37+
.env.sentry-build-plugin

apps/web/instrumentation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export async function register() {
1010
}
1111
}
1212

13-
export const onRequestError = Sentry.captureRequestError;
13+
export const onRequestError = Sentry.captureRequestError;

apps/web/next.config.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,46 @@ module.exports = withSentryConfig(
7575
automaticVercelMonitors: true,
7676
}
7777
);
78+
79+
80+
// Injected content via Sentry wizard below
81+
82+
const { withSentryConfig } = require("@sentry/nextjs");
83+
84+
module.exports = withSentryConfig(
85+
module.exports,
86+
{
87+
// For all available options, see:
88+
// https://github.com/getsentry/sentry-webpack-plugin#options
89+
90+
org: "vigneshfixes",
91+
project: "projectify",
92+
93+
// Only print logs for uploading source maps in CI
94+
silent: !process.env.CI,
95+
96+
// For all available options, see:
97+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
98+
99+
// Upload a larger set of source maps for prettier stack traces (increases build time)
100+
widenClientFileUpload: true,
101+
102+
// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
103+
// This can increase your server load as well as your hosting bill.
104+
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
105+
// side errors will fail.
106+
// tunnelRoute: "/monitoring",
107+
108+
// Hides source maps from generated client bundles
109+
hideSourceMaps: true,
110+
111+
// Automatically tree-shake Sentry logger statements to reduce bundle size
112+
disableLogger: true,
113+
114+
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
115+
// See the following for more information:
116+
// https://docs.sentry.io/product/crons/
117+
// https://vercel.com/docs/cron-jobs
118+
automaticVercelMonitors: true,
119+
}
120+
);

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@radix-ui/react-toggle": "^1.1.2",
3232
"@radix-ui/react-tooltip": "^1.1.8",
3333
"@repo/backend": "*",
34-
"@sentry/nextjs": "8",
34+
"@sentry/nextjs": "^9.1.0",
3535
"@tanstack/react-table": "^8.16.0",
3636
"@tiptap/extension-link": "^2.4.0",
3737
"@tiptap/pm": "^2.4.0",

apps/web/sentry.client.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import * as Sentry from "@sentry/nextjs";
66

77
Sentry.init({
8-
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
8+
dsn: "https://f1b467610d3ffa6d3c75c4e2e90760d7@o4506822757253120.ingest.us.sentry.io/4506822758957056",
99

1010
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
1111
tracesSampleRate: 1,

apps/web/sentry.edge.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import * as Sentry from "@sentry/nextjs";
77

88
Sentry.init({
9-
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
9+
dsn: "https://f1b467610d3ffa6d3c75c4e2e90760d7@o4506822757253120.ingest.us.sentry.io/4506822758957056",
1010

1111
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
1212
tracesSampleRate: 1,

apps/web/sentry.server.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import * as Sentry from "@sentry/nextjs";
66

77
Sentry.init({
8-
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
8+
dsn: "https://f1b467610d3ffa6d3c75c4e2e90760d7@o4506822757253120.ingest.us.sentry.io/4506822758957056",
99

1010
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
1111
tracesSampleRate: 1,

yarn.lock

Lines changed: 447 additions & 379 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)