All posts

Error Tracking Best Practices for Production Apps

Learn the best practices for setting up and managing error tracking in production, from alert configuration to noise reduction.

Beyond the Basic Setup

Installing an error tracking SDK is step one. Getting real value from error tracking requires thoughtful configuration, noise management, and team processes. Here are the practices that separate teams who effectively use error tracking from those who ignore their dashboards.

1. Set Up Environment Separation

Never mix development and production errors. Configure separate environments so your dashboard only shows errors that affect real users:

Bugsly.init({
  dsn: 'YOUR_DSN',
  environment: process.env.NODE_ENV, // 'production', 'staging', 'development'
});

Filter your dashboard to show production errors by default. Development errors are noise.

2. Configure Meaningful Alerts

The biggest reason teams stop checking their error tracker is alert fatigue. Configure alerts to be actionable:

Alert on these:

  • New errors that have never been seen before
  • Errors affecting more than 1% of users
  • Sudden spikes in error rate (indicates a bad deploy)
  • Errors in critical paths (checkout, authentication, payment)

Do NOT alert on these:

  • Every individual error occurrence
  • Known errors you are already tracking
  • Expected errors (404s, rate limits)

3. Add Context to Errors

The most useful error reports include context about what was happening when the error occurred:

// Set user context
Bugsly.setUser({ id: user.id, email: user.email });

// Add breadcrumbs for important actions
Bugsly.addBreadcrumb({
  category: 'user-action',
  message: 'Clicked checkout button',
  level: 'info',
});

// Add custom tags for filtering
Bugsly.setTag('subscription_tier', user.plan);

4. Use Release Tracking

Tag errors with the release version so you can immediately see if a deploy introduced new errors:

Bugsly.init({
  dsn: 'YOUR_DSN',
  release: process.env.GIT_SHA || '1.0.0',
});

This enables:

  • "New in this release" filtering
  • Regression detection
  • Suspect commit identification

5. Filter Out Noise

Not all errors are bugs. Filter out expected errors to keep your dashboard focused:

Bugsly.init({
  dsn: 'YOUR_DSN',
  ignoreErrors: [
    'ResizeObserver loop limit exceeded',
    'Network request failed',
    /Loading chunk \d+ failed/,
  ],
  denyUrls: [
    /extensions\//i,
    /^chrome:\/\//i,
  ],
});

6. Establish a Triage Process

Error tracking is only useful if someone acts on the errors. Establish a rotation:

  1. Daily triage: One developer reviews new errors each morning (15 minutes)
  2. Severity classification: P0 (data loss/security) through P3 (cosmetic)
  3. Assignment: Link errors to issues in your project tracker
  4. Resolution: Mark errors as resolved when the fix ships

7. Monitor Error Budgets

Set an error budget based on your error rate. For example, if your baseline is 0.1% error rate, alert when it exceeds 0.5%. This is more meaningful than absolute error counts.

8. Upload Source Maps

Minified stack traces are useless. Always upload source maps or debug symbols as part of your CI/CD pipeline. Most tools provide a CLI or plugin for this.

9. Track Errors Across the Stack

A frontend error is often caused by a backend issue. Use the same error tracking tool for both frontend and backend, and correlate errors using trace IDs or request IDs.

10. Review and Clean Up Regularly

Schedule a monthly review to:

  • Resolve errors that no longer occur
  • Update ignore rules for new known noise
  • Review alert rules for effectiveness
  • Check that new services have error tracking configured

These practices turn error tracking from a ignored dashboard into an active part of your development workflow.

Try Bugsly Free

AI-powered error tracking that explains your bugs. Set up in 2 minutes, free forever for small projects.

Get Started Free