Skip to content

Sentry setup#92

Merged
zolfagharipour merged 3 commits intodevfrom
sentry-setup
Mar 11, 2026
Merged

Sentry setup#92
zolfagharipour merged 3 commits intodevfrom
sentry-setup

Conversation

@LuckyIntegral
Copy link
Copy Markdown
Collaborator

This pull request introduces Sentry error monitoring and tracing throughout the Next.js client application. The integration includes configuration for client, server, and edge environments, as well as example error routes and pages to test Sentry functionality. Additional improvements were made to error handling and the browsing experience. The most important changes are grouped below:

Sentry Integration and Configuration

  • Added Sentry as a dependency (@sentry/nextjs) and related packages in package.json, and updated .env.example to include the Sentry DSN environment variable. [1] [2]
  • Configured Sentry for client (src/instrumentation-client.ts), server (sentry.server.config.ts), and edge environments (sentry.edge.config.ts), enabling tracing, logging, replay, and PII support. [1] [2] [3]
  • Updated next.config.ts to wrap the Next.js config with Sentry's configuration, including source map uploading, tunnel routing, and bundle size optimizations. [1] [2]
  • Added Sentry-related configuration files for VSCode and Cursor (.vscode/mcp.json, .cursor/mcp.json). [1] [2]

Error Handling and Monitoring

  • Implemented global error capturing with Sentry in src/app/global-error.tsx, ensuring all uncaught errors in the app are reported.
  • Added a sample API route (src/app/api/sentry-example-api/route.ts) and frontend page (src/app/sentry-example-page/page.tsx) to demonstrate and test Sentry error monitoring. [1] [2]
  • Updated instrumentation logic to dynamically load Sentry config based on runtime and expose request error capturing. [1] [2]

UI Improvements

  • Enhanced the chat page sidebar with a description for improved usability. [1] [2]
  • Improved error handling in the feed page to more gracefully detect and display profile incomplete errors. [1] [2]

@LuckyIntegral
Copy link
Copy Markdown
Collaborator Author

To test the Sentry monitoring, check the localhost:3000/app/sentry-example-page page
Before doing so, please register a Sentry account and send me your email address

@zolfagharipour zolfagharipour merged commit 789c145 into dev Mar 11, 2026
2 checks passed
LuckyIntegral pushed a commit that referenced this pull request Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants