ERR-003 recommended Setup

Stack traces configured

Stack traces enabled and useful; performance tracing configured with appropriate sample rate

Question to ask

"Do your stack traces point to real source lines or minified junk?"

Verification guide

Severity: Recommended

Stack traces are essential for debugging. They should be enabled and useful (not minified garbage).

Check automatically:

  1. Check for stack trace configuration:
# Check for stack trace and tracing settings
grep -riE "attachStacktrace|tracesSampleRate|normalizeDepth" --include="*.ts" --include="*.js" --include="*.tsx" src/ lib/ app/ config/ 2>/dev/null | head -10

# Check Sentry init for tracing
grep -A 30 "Sentry.init" --include="*.ts" --include="*.js" --include="*.tsx" src/ lib/ app/ 2>/dev/null | grep -iE "trace|stack|depth"
  1. Check if performance tracing is enabled:
# Tracing packages and config
grep -riE "tracesSampleRate|BrowserTracing|@sentry/tracing|Sentry.*Integrations" --include="*.ts" --include="*.js" . 2>/dev/null | grep -v node_modules | head -10

If not found in code, ask user:

  • "Are full stack traces being captured in Sentry?"
  • "Is performance tracing (transactions) enabled?"
  • "What's the tracesSampleRate?"

Cross-reference with:

  • ERR-004 (source maps make stack traces readable)

Pass criteria:

  • attachStacktrace: true or default behavior confirmed
  • Stack traces visible and useful in Sentry dashboard
  • For performance: tracesSampleRate configured (even if low, e.g., 0.1)

Fail criteria:

  • Stack traces disabled
  • Errors show up without stack context

Partial (acceptable):

  • Stack traces enabled but minified (needs source maps - see ERR-004)
  • Low tracesSampleRate due to cost/volume concerns - document the rate

Evidence to capture:

  • Stack trace configuration
  • tracesSampleRate value
  • Sample error from Sentry showing stack trace quality

Section

19. Error Reporting

Error Tracking & Reliability