Feature

Germain UX RUM JS captures all JavaScript Unhandled Promise Rejections.

KPIs

KPIs for User Monitoring and Replay | Unhandled-Promise-Rejection-KPIs

Example

Unhandled Promise Rejections on Drill-through

Unhandled Promise Rejections on Drill-through

Configuration

Error Categorization

By default, all unhandled promise rejections are collected as simple events and not errors. Based on the rejection message, you can categorize each rejection and tag it as an error by providing settings.plugins.unhandledRejection.errorCategorizer function in the Init Script.

The following code sample how to categorize these events as errors when their message rejection contains a string error.

const settings = germainApm.getDefaultSettings();
...
settings.plugins.unhandledRejection.errorCategorizer = (reason) => {
   return reason && reason.indexOf('error') > -1;
};
...
germainApm.start(settings);
JS

Component: RUM JS

Feature Availability: 2022.2 or later