Error Types
RUM can monitor the following types of errors:- JavaScript Errors
- Network Errors
- Resource Loading Errors
- Custom Errors
Includes syntax errors, runtime exceptions, and unhandled Promise rejections. These issues can cause page functionality to fail, severely impacting user experience.
Reporting Methods
Automatic Error Capture
RUM SDK automatically captures the following types of browser errors:| Error Type | Description |
|---|---|
| Uncaught exceptions | Runtime JavaScript exceptions (e.g., TypeError, ReferenceError) |
| Unhandled Promise rejections | Promise errors not handled by .catch() |
| Network errors | XHR or Fetch request failures (e.g., 4xx, 5xx status codes or network interruption) |
| React rendering errors | Exceptions during React component rendering (requires error boundaries) |
- Automatically captured errors include stack traces, error messages, and source information by default.
- Errors from browser extensions or third-party scripts (e.g.,
networksource) are filtered to avoid data pollution.
Manual Error Reporting
Using theaddError API, you can manually report handled exceptions, custom errors, or other errors not automatically captured.
Use cases:
- Record handled errors in business logic
- Attach context information (e.g., user ID, page state) for troubleshooting
- Monitor exceptions from third-party services or async operations
React Error Boundary Integration
RUM supports capturing component rendering errors through React Error Boundaries and reporting error information. You can call theaddError API in componentDidCatch to attach component stack information for debugging.
Error Data Structure
Each error record contains the following attributes describing error details and context:Error source (e.g.,
console, network, custom, source, report)Error type or error code (e.g.,
TypeError, NetworkError)Concise, human-readable error message
Error stack trace or supplementary information
List of related errors providing additional context (optional)
Custom context information (e.g., page state, user ID) passed via
addErrorError Filtering and Configuration
To ensure error data accuracy and relevance, RUM applies the following filtering rules:Default Filtering Rules
Default Filtering Rules
- Only processes errors with
sourceofcustom,source,report, orconsole - Ignores irrelevant errors from browser extensions, third-party scripts, or
networksource
Stack Requirements
Stack Requirements
Errors must contain stack trace information, otherwise they may be ignored
Custom Filtering
Custom Filtering
Use the
beforeSend callback to customize error handling logic, filter or modify error dataCustom Error Filtering Example
Frequently Asked Questions
Why are some errors not grouped?
Why are some errors not grouped?
- Check if the stack trace is complete, or if custom fingerprints conflict
- Verify that sourcemaps are correctly uploaded; if not, stacks may not be properly parsed
How to reduce noise from third-party script errors?
How to reduce noise from third-party script errors?
Use the
beforeSend callback to filter specific error sources or messages:What if custom grouping doesn't work?
What if custom grouping doesn't work?
- Ensure the
fingerprintproperty is correctly set and the value is a string - Check if the
beforeSendcallback is being called correctly
Best Practices
Enrich Context Information
Attach business-related context in
addError (e.g., user ID, action type) for easier troubleshooting.Example: { userId: "12345", action: "submit_form" }Optimize Error Boundaries
Configure error boundaries for critical React components to ensure rendering errors are captured. Record component names and versions for easier tracking.
Control Error Volume
Use sampling rates or
beforeSend to filter low-value errors and avoid data overload. Prioritize monitoring critical errors that impact user experience.Analysis and Visualization
View error data trends and distribution in the Analytics Dashboard - Error Analysis tab to address key issues.
Next Steps
View Errors
Learn how to view and analyze Issues in the Error Tracking module