This documentation is for version 6 of the BugSnag JavaScript notifier. We recommend upgrading to the latest release using our Upgrade guide. Documentation for the current release can be found here.
The BugSnag SDK automatically captures a variety of data to help you debug your errors. You may wish to avoid capturing some types of data, particularly if there are privacy implications for your users.
User information is used to show you which errors are impacting the most users. Set your own user identifiers if you want to be able to find errors affecting individual users.
| Data | Default value | Preventing collection | 
|---|---|---|
| User ID | The user’s IP address | To override set useror to prevent collection configurecollectUserIp | 
Information about the device can be useful to identify if an error is only occurring on some devices.
| Data | Default value | Preventing collection | 
|---|---|---|
| Locale | The locale of the browser | Modify devicein a callback | 
| User agent | The user agent of the browser | Modify devicein a callback | 
Details about the request can be helpful to reproduce errors.
| Data | Default value | Preventing collection | 
|---|---|---|
| Client IP | The IP address | Configure collectUserIp | 
| Request URL | The URL including query parameters | Modify requestin a callback | 
Breadcrumbs are automatically recorded for common actions and can be helpful to reproduce errors.
| Data | Default value | Preventing collection | 
|---|---|---|
| Console message | The message sent to the console and its severity | Set consoleBreadcrumbsEnabledor modifybreadcrumbsin a callback | 
| User interactions | The selector of the element which was clicked and its text value | Set interactionBreadcrumbsEnabledor modifybreadcrumbsin a callback | 
| Navigation | The URL, page title and history state when navigation occurs | Set navigationBreadcrumbsEnabledor modifybreadcrumbsin a callback | 
| Network requests | The URL requested and the status code returned | Set networkBreadcrumbsEnabledor modifybreadcrumbsin a callback | 
Modifying error information may affect error grouping.
| Data | Default value | Preventing collection | 
|---|---|---|
| Context | The pathname of the URL | Modify contextin a callback | 
| Error class | The class of the error that occurred | Modify errorClassin a callback | 
| Error message | The message of the error that occurred | Modify errorMessagein a callback | 
| Inline script content | The contents of an inline script where an error occurred | Modify stacktracein a callback | 
| Stack trace | The URL of the file where the error occurred, method and line number | Modify stacktracein a callback | 
React provides additional information to error boundary components, which is added to error reports as metadata.
| Data | Default value | Preventing collection | 
|---|---|---|
| Component stack | The hierarchy of components to where the error occurred | Modify reactmetadata in a callback |