Stack traces

Last updated:

|Edit this page

On this page

⚠️ Error tracking is currently released as a beta in feature preview. You can enable it from within your PostHog account. If you have any feedback during the beta, please share it with us.

Error tracking provides you with the ability 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.

For languages like Python, the stack trace and code context can be gathered by the PostHog client and requires no additional processing.

Stack traces example

Symbol sets

Compiled or minified languages requires additional information to perform a process called symbolification to produce the same stack trace and code context output shown above. The additional information is known as a symbol set.

For example, in the case of minified JavaScript, a source map is needed as a symbol set. We currently rely on source maps being publicly available as we do not (yet) support uploading symbol sets during the build phase of your application.

The source of a frame in the exception stack trace should point to the minified code of your application which should contain the sourceMappingUrl parameter denoting the location of the source map. Both of these files must be publicly accessible for PostHog to fetch and symbolify the stack trace.

You can see the symbol sets fetched by PostHog and the associated frames within the error tracking settings. Any missing symbol sets will also be present along with the failure reason. From here you can also manually upload missing symbol sets or replace existing ones.

Symbol set examples

Questions? Ask Max AI.

It's easier than reading through 575 docs articles.

Community questions

Was this page useful?

Next article

Troubleshooting and FAQs

FAQs Are web workers supported? Yes. Error tracking will work as long as you initialize PostHog in the web worker . You will need to disable any features that rely on the window object: To identify users in web workers you will need to pass the distinct ID. This can be done via an env variable or sending it via postMessage from your main application. Can exceptions be sampled / ignored Returning null for a given event in the before_send hook will cause it not to be captured. You may…

Read next article