Skip to main content

Source: ocean/docs/sentry-team-plan-guide.md | ✏️ Edit on GitHub

Sentry Team Plan Optimization Guide

Plan Details

  • Cost: $26/month + $100 pay-as-you-go budget
  • Included: 50K errors, 100K performance units, 500 replays, 1GB attachments

Configuration Changes Made

1. Increased Sampling Rates

// Production rates increased for better visibility
tracesSampleRate: 0.2 // 20% (was 10%)
replaysSessionSampleRate: 0.05 // 5% (was 1%)
profilesSampleRate: 0.05 // 5% (was 1%)

2. Enhanced Session Replays

  • Text content now visible (not masked)
  • Network requests recorded for debugging
  • Better error context with 100% error replay rate

3. Performance Monitoring

  • Track auth flows, Stripe, and GraphQL operations
  • Custom transaction grouping to avoid cardinality issues
  • Session timing for user experience metrics

Setting Up Alerts (Dashboard Required)

Critical Alerts to Configure

  1. Error Spike Alert

    • Threshold: 50+ errors in 5 minutes
    • Send to: Slack/Email
  2. New Error Type

    • First occurrence of new error
    • Immediate notification
  3. Performance Regression

    • P95 latency > 3 seconds
    • Critical user paths only
  4. High Error Rate

    • Error rate > 5% of sessions
    • Check every 15 minutes

Cost Management

Stay Within Budget

  1. Monitor Usage

    • Check Sentry dashboard weekly
    • Set up billing alerts at 80% usage
  2. Spike Protection

    • Enable in Settings → Spike Protection
    • Caps at 3x your quota to prevent overages
  3. Smart Filtering

    // Already configured in code
    ignoreErrors: ['ResizeObserver', 'NetworkError', 'Extension errors']

Pay-As-You-Go Triggers ($100 budget)

  • Errors: $0.00025 per error after 50K
  • Performance: $0.0001 per transaction after 100K
  • Replays: $0.02 per replay after 500

Best Practices

1. Use Custom Context

Sentry.setContext('subscription', {
plan: user.plan,
status: user.subscriptionStatus,
mrr: user.monthlyRevenue,
})

2. Track Business Metrics

Sentry.metrics.increment('purchase.completed', 1, {
tags: { plan: 'pro', method: 'stripe' },
})

3. Release Tracking

  • Automatic with Vercel integration
  • Shows which release introduced errors
  • Track adoption rates

4. Issue Grouping

  • Use fingerprinting for similar errors
  • Merge related issues
  • Archive noise

Monthly Checklist

  • Review top 10 errors
  • Check performance trends
  • Analyze user sessions with errors
  • Update alert thresholds
  • Review usage vs limits
  • Archive resolved issues

ROI Metrics

Track these to justify the cost:

  1. Time to Resolution: Should drop 50%+
  2. User Impact: Errors affecting <1% of users
  3. Performance: P95 latency improvements
  4. Developer Hours Saved: 5+ hours/month

Next Steps

  1. Set up Slack integration for alerts
  2. Configure release tracking
  3. Create custom dashboards
  4. Set up weekly error review process