How it works
Error tracking monitors your application for errors and groups them into issues:- PostHog captures JavaScript errors and exceptions
- Errors are fingerprinted and grouped by root cause
- Each issue shows occurrences, affected users, and stack traces
- Link to session replays to see exactly what users did
- Assign issues to team members for resolution
Error tracking is built into PostHog. Enable it in your project settings, no separate SDK needed.
Setting up error tracking
Enable error tracking in your PostHog config:1
Enable in PostHog
2
Configure stack trace parsing
Upload source maps for readable stack traces:
3
Test error capture
Trigger a test error:
Error grouping
Errors are automatically grouped into issues by fingerprint:- Error type and message
- Stack trace signature
- File and line number
- Function name
Customize fingerprinting with grouping rules if PostHog groups too broadly or narrowly.
Issue details
Each issue shows comprehensive debugging context:- Stack trace
- User impact
- Session context
Full stack trace with source locations:Click any frame to:
- See surrounding code context
- View the full file (with source maps)
- Jump to GitHub/GitLab (with integration)
Issue management
Track issue status and ownership:1
Issue states
Mark issues with status:
- Active: New or ongoing errors
- Resolved: Fixed and deployed
- Archived: Not important or won’t fix
- Ignored: Suppress future occurrences
2
Assignment
Assign issues to team members:Team members get notified when assigned.
3
External integration
Link to external issue trackers:
- Create Jira tickets from issues
- Link to GitHub/GitLab issues
- Sync status between systems
Custom error tracking
Track custom exceptions:Error filtering
Filter out noise from error tracking:Ignore known errors
Ignore known errors
Configure errors to ignore:
Sample error rate
Sample error rate
Reduce volume for high-frequency errors:Sampling applies after grouping, so you still see all unique issues.
Filter by environment
Filter by environment
Track errors differently by environment:
Source maps
Upload source maps for readable stack traces:- Webpack
- Vite
- Manual upload
Common workflows
Debug production errors
- See error in error tracking
- Click to view stack trace
- Open linked session replay
- Watch what user did before error
- Reproduce locally and fix
Monitor error trends
Create dashboard tracking:
- Total errors over time
- Errors by type
- Most affected users
- Error rate by version
Alert on critical errors
Set up alerts for:
- New error types
- Error spike (10x normal rate)
- Errors affecting >100 users
- Payment or auth errors
Prioritize fixes
Sort issues by:
- User impact (affected users × frequency)
- Business criticality (checkout, payment)
- Recent spike in occurrences
- Unresolved age
Error alerts
Get notified when errors occur:Best practices
Add context to errors
Add context to errors
Include relevant data with exceptions:
Track handled errors
Track handled errors
Don’t just track uncaught exceptions. Track errors you catch and handle:
Use consistent error types
Use consistent error types
Create custom error classes for better grouping:
Set up source maps in CI/CD
Set up source maps in CI/CD
Automatically upload source maps on deployment: