Issues and exceptions

Last updated:

|Edit this page|

This page introduces the concept of issues and exceptions, how they fit into the error tracking workflow, and how you can work with them.

What is an exception?

Errors are initially captured as individual $exception events. Like other events in PostHog, they contain properties that you can use to filter and group them. You can also use them to create insights, filter recordings, trigger surveys, and more.

Exception events
View recent exception events in the Activity tab

You can expect the following properties to be present in the exception events (in addition to the standard event properties):

NameKeyExample value
$exception_listListA list of exceptions that occurred. In languages that support chained exceptions, the list will contain multiple items. Contains the following properties:
└─ typeStringThe type of exception that occurred
└─ valueStringThe message of the exception that occurred
└─ stacktraceObjectContains a list of stack frames that occurred
└─ mechanismObjectIf the stacktrace is handled and if it's synthetic
$exception_fingerprintStringA fingerprint of the exception
$exception_levelStringThe level of the severity of the error

These captured properties are used to build a fingerprint of the exception, which is used to group similar exceptions into issues.

What is an issue?

Issues are groups of similar $exception events that share common event information, such as the exception type, message, and stack trace. They're the primary way you interact with captured exceptions in error tracking.

Issues list view
The error tracking dashboard displays a list of issues
Issue view
Opening an issue shows detailed information about its exceptions

When working in the context of error tracking, PostHog groups similar exception events into issues to help you triage them and take action. You can do the following with issues:

How exceptions are grouped into issues

PostHog attempts to group similar exceptions into an issue automatically by their exception type, exception message, and stack traces. The quality of automatic grouping can vary depending on the data available.

You can customize issue grouping logic by using custom grouping rules, merging issues, or labeling exceptions with a custom fingerprint.

When multiple issue grouping methods apply, PostHog applies them in the following order:

  1. Client-side defined custom fingerprint using $exception_fingerprint
  2. Match custom grouping rules defined in PostHog
  3. If no user defined logic, fall back to automatic fingerprinting

We're working on improving our grouping algorithm. If you spot two issues that you think should have been one, or one issue that you think should have been split into two, please let us know in-app.

Questions? Ask Max AI.

It's easier than reading through 718 pages of documentation

Community questions

Was this page useful?

Next article

Stack traces

Error tracking enables you to view the stack trace and code context associated with an exception. This can help understand, identify and resolve the root cause of an issue. Stack traces are available for all languages and can be found in the details page of an issue. Resolving stack traces If you use a compiled language or server minified bundles, you'll need to upload source maps to get stack traces. Compiled or minified code obfuscates the original source code, so PostHog uses the source map…

Read next article