Error monitoring and issue management

Last updated:

|Edit this page

Errors are captured as $exception events which means that you can create insights, filter recordings, trigger surveys, and more in the same way you can for any other type of event.

Issue list

In addition to using events in insights, replays, and surveys as mentioned above customers can also visit the error tracking page.

Exceptions are grouped by type, each with aggregated counts and sparklines providing an indication of the severity of each group. You can also search for exceptions containing specific text and filter to see which exceptions affect certain users.

Error tracking overview

Clicking through to an individual group shows you all the associated exceptions, including the associated stack trace, active feature flags when the exception was captured, and a link to the relevant session replay.

Error tracking details

Managing issues

Our error tracking product gives you multiple ways to manage issues towards resolution.

The most basic is assigning an error to a teammate. To do this, select the profile icon under assignee and search for your teammate you want to assign it to, and select them. You can click this again to unassign them.

User groups

Error tracking enables you to assign issues to individual users, but what if you want to assign issues to a group? You can create a group in your project settings under Error tracking.

Error tracking user groups

Merging issues

You can merge issues representing the same problem by:

  1. Selecting the primary issue others should be merged into
  2. Selecting the issue(s) to merge into the primary issue
  3. Clicking the Merge button

After merging, all events and properties from the merged issues are added to the primary issue. The merged issues are then deleted.

Custom issue grouping

PostHog attempts to group the same exceptions as a single issue. An $exception_fingerprint property is generated during ingestion by PostHog and used to perform this grouping. Setting the $exception_fingerprint property on the frontend will override the default flow to allow for custom grouping of certain exceptions.

When using the captureException method you can provide $exception_fingerprint as an additional property in the functions second argument.

JavaScript
posthog.captureException(error, { $exception_fingerprint: "MyCustomGroup" })

Should an exception be autocaptured, you will need to modify the properties before the event is sent. The PostHog config offers a before_send hook that fires for each event. You can alter the event as part of this callback to add the property:

JavaScript
posthog.init("<ph_project_api_key>", {
before_send: (event) => {
if (event.event === "$exception") {
const exceptionList = event.properties["$exception_list"] || []
const exception = exceptionList.length > 0 ? exceptionList[0] : null;
if (exception && exception["$exception_type"] == "SyntaxError") {
event.properties["$exception_fingerprint"] = "MyCustomGroup"
}
}
return event
}
})

Questions? Ask Max AI.

It's easier than reading through 634 pages of documentation

Community questions

Was this page useful?

Next article

How to filter and search error tracking issues

What is an issue? Exception events are grouped into issues based on event information, such as the exception type, message, and stack trace. The data used for grouping depends on what is available. 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 . Bear in mind that you can also combine two issues by merging them . Finding specific issues You can…

Read next article