Skip to main content
Error tracking captures exceptions and errors in your application automatically. See full stack traces, session context, and user impact to debug issues faster than logs alone.

How it works

Error tracking monitors your application for errors and groups them into issues:
  1. PostHog captures JavaScript errors and exceptions
  2. Errors are fingerprinted and grouped by root cause
  3. Each issue shows occurrences, affected users, and stack traces
  4. Link to session replays to see exactly what users did
  5. 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:
PostHog generates fingerprints based on:
  • 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:
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:
Configure errors to ignore:
Reduce volume for high-frequency errors:
Sampling applies after grouping, so you still see all unique issues.
Track errors differently by environment:

Source maps

Upload source maps for readable stack traces:

Common workflows

Debug production errors

  1. See error in error tracking
  2. Click to view stack trace
  3. Open linked session replay
  4. Watch what user did before error
  5. 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

Include relevant data with exceptions:
Don’t just track uncaught exceptions. Track errors you catch and handle:
Create custom error classes for better grouping:
Automatically upload source maps on deployment: