Skip to content

05: error tracking#4

Merged
harshshukla2807 merged 1 commit intomainfrom
05-error-tracking
Apr 22, 2026
Merged

05: error tracking#4
harshshukla2807 merged 1 commit intomainfrom
05-error-tracking

Conversation

@harshshukla2807
Copy link
Copy Markdown
Owner

@harshshukla2807 harshshukla2807 commented Apr 22, 2026

Summary by CodeRabbit

  • New Features

    • Integrated error tracking and monitoring system with real-time error capture and diagnostics.
    • Added organization selection redirect for authenticated users without assigned organizations.
    • New demonstration page showcasing error tracking capabilities.
  • Chores

    • Updated development environment configuration.
    • Added monitoring-related dependencies and configuration files.
    • Enhanced global error handling for improved stability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 528107d3-953d-4937-aecd-aa3a1b2ca501

📥 Commits

Reviewing files that changed from the base of the PR and between 1bd870a and cddc1ea.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • .gitignore
  • .npmrc
  • apps/web/app/(dashboard)/page.tsx
  • apps/web/app/api/sentry-example-api/route.ts
  • apps/web/app/global-error.tsx
  • apps/web/app/sentry-example-page/page.tsx
  • apps/web/instrumentation-client.ts
  • apps/web/instrumentation.ts
  • apps/web/middleware.ts
  • apps/web/next.config.mjs
  • apps/web/package.json
  • apps/web/sentry.edge.config.ts
  • apps/web/sentry.server.config.ts
  • package.json
  • packages/backend/convex/users.ts

📝 Walkthrough

Walkthrough

This PR integrates Sentry error monitoring and tracing into a Next.js web application. It adds Sentry SDK configuration for client, server, and edge runtimes, introduces example pages and API routes for testing error capture, updates middleware for org-free route handling, configures npm hoisting patterns, and removes Turbopack from development.

Changes

Cohort / File(s) Summary
Sentry Configuration
apps/web/sentry.server.config.ts, apps/web/sentry.edge.config.ts, apps/web/instrumentation-client.ts, apps/web/instrumentation.ts, apps/web/next.config.mjs
Added Sentry initialization for server, edge, and client runtimes with DSN, tracing, replay, and logging. Wrapped Next.js config with withSentryConfig to integrate Sentry build tooling and configure monitoring routes.
Sentry Example Pages & Routes
apps/web/app/api/sentry-example-api/route.ts, apps/web/app/global-error.tsx, apps/web/app/sentry-example-page/page.tsx
Added example API route that throws a Sentry-tracked error, global error boundary capturing exceptions, and interactive page with button to trigger frontend and backend errors for testing Sentry connectivity.
Core Configuration Updates
package.json, apps/web/package.json, .npmrc, .gitignore
Updated root dev script to disable Node deprecation warnings, removed --turbopack flag from web dev script, added @sentry/nextjs@10 dependency, and configured npm public hoisting for middleware packages.
Application Logic Updates
apps/web/middleware.ts, apps/web/app/(dashboard)/page.tsx, packages/backend/convex/users.ts
Enabled org-selection route redirect logic in middleware with type annotations, commented out users query output in dashboard, and added commented-out error simulation line in backend users module.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • 02: convex package #1: Adds Convex endpoints (getMany/add) to packages/backend/convex/users.ts; this PR later modifies the same file with a commented-out error line, indicating shared backend context.

Poem

🐰 A rabbit hops through error trails,
Sentry watches, never fails,
From client to edge, the traces flow,
Each span and replay helps us grow!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 05-error-tracking

Comment @coderabbitai help to get the list of available commands and usage tips.

@harshshukla2807 harshshukla2807 merged commit 2c3430b into main Apr 22, 2026
1 check was pending
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.

1 participant