Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Minor: No Error Monitoring (Sentry or Similar) #26

@AliiiBenn

Description

@AliiiBenn

Priority

🟡 Minor - Production Reliability

Location

Application-wide - missing error tracking integration

Problem Description

No automated error monitoring in production. Errors are only visible in browser console or server logs.

Current State

Client-Side Errors

Component throws error → Error visible only in browser console, no server notification, no user tracking.

Server-Side Errors

API route fails → Error in server logs only, lost if logs rotate, no alerting.

Issues

1. Invisible Errors

User reports "it's broken", developer asks "what error?", user says "I didn't see one", developer has no information.

2. No Error Context

Error logged but no user info, request info, environment info.

3. No Grouping

Same error from 100 users logged 100 times, should be grouped as 1 issue.

4. No Alerting

Production errors silent, users notice before developers, no SLA monitoring.

5. Lost Errors

Browser console cleared on refresh, server logs rotated after 7 days, historical errors lost.

Expected Behavior

Sentry Integration

Install @sentry/nextjs, configure client/server/edge, add error boundary.

Custom Context

Add user context, request context, custom tags, capture with extra data.

Benefits

1. Real-Time Alerts

Error in production → Slack notification immediately, email to on-call engineer, Jira ticket created.

2. Error Grouping

See error with users affected, occurrences, first seen, last seen, URL.

3. Full Context

User, request, browser, device, memory, release information.

4. Session Replay

Watch user's session leading to error, see exactly what they clicked, reproduce the issue easily.

5. Performance Monitoring

Transaction duration, database time, error rate.

Related Issues

Steps to Fix

Phase 1: Setup

  1. Create Sentry account (free tier available)
  2. Create project in Sentry dashboard
  3. Get DSN (Data Source Name)
  4. Add DSN to .env

Phase 2: Integration

  1. Install @sentry/nextjs
  2. Configure client/server/edge
  3. Add error boundary
  4. Test with intentional error

Phase 3: Context

  1. Add user context
  2. Add request context
  3. Add custom tags
  4. Set up filtering

Phase 4: Alerts

  1. Configure Slack notifications
  2. Set up email alerts
  3. Define alert thresholds
  4. Create on-call schedule

Alternatives to Sentry

Free Options

  • Sentry (Free: 5k errors/month)
  • LogRocket (Free trial)
  • Rollbar (Free tier limited)
  • Bugsnag (Free trial)

Self-Hosted

  • Sentry Self-Hosted (Docker)
  • GlitchTip (Open source Sentry alternative)

Simple Options

  • Discord webhook (Free)
  • Slack webhook (Free)
  • Email (Free but noisy)

Additional Context

Error monitoring is essential for production reliability. Without it, you're flying blind - you only know about errors users choose to report (which is ~1% of actual errors).

Cost Considerations

  • Sentry Free: 5,000 errors/month
  • Sentry Paid: 6/month for 100k errors
  • For a learning platform, expect 10-100 errors/day per 1,000 users

Best Practices

  1. Filter noise: Don't send 404s from bots
  2. Add context: User, request, environment
  3. Set alerts: Critical errors wake someone up
  4. Review regularly: Weekly triage of new issues
  5. Close issues: Mark resolved when deployed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions