Unhandled Promise Rejection Monitoring

✨ 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


⚙️ 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.

Snippet

Details

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

This code categorizes unhandled promise rejections as errors when their message contains the substring error.


Component: RUM JS

Feature Availability: 2022.2 or later