feat: integrate Sentry for error monitoring in Next.js application

- Added Sentry configuration for edge features in `sentry.edge.config.ts`
- Added Sentry configuration for server-side in `sentry.server.config.ts`
- Created a sample API route to demonstrate error tracking in `src/app/api/sentry-example-api/route.ts`
- Developed a frontend page to trigger and log errors in `src/app/sentry-example-page/page.tsx`
- Configured client-side Sentry initialization in `src/instrumentation-client.ts` with Replay integration
- Implemented instrumentation registration logic in `src/instrumentation.ts`
This commit is contained in:
2026-06-26 12:48:29 +08:00
parent 09cbd54c79
commit 7dde951306
10 changed files with 1653 additions and 22 deletions
+1
View File
@@ -26,6 +26,7 @@
},
"dependencies": {
"@fingerprintjs/fingerprintjs": "^5.2.0",
"@sentry/nextjs": "^10.61.0",
"@stripe/react-stripe-js": "^6.6.0",
"@stripe/stripe-js": "^9.8.0",
"@xstate/react": "^5",