Automatically captured data

BugSnag 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.

This documentation is for version 7+ of the BugSnag JavaScript notifier. If you are using older versions, we recommend upgrading to the latest release using our Upgrade guide. Documentation for the previous release can be found on our legacy pages.

User information

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.

Browser

Data Default value Preventing collection
User ID The user’s IP address Modify user in a callback or to prevent collection configure collectUserIp

Node.js

Data Default value Preventing collection
User ID The user’s IP address Modify user in a callback

Device information

Information about the device can be useful to identify if an error is only occurring on some devices.

Browser

Data Default value Preventing collection
Device ID A generated anonymous ID Configure generateAnonymousId
Locale The locale of the browser Modify device in a callback
User agent The user agent of the browser Modify device in a callback

Node.js

Data Default value Preventing collection
Hostname The result of os.hostname() on the device (or process.env.DYNO when running on Heroku) Modify device in a callback
Runtime versions The value of process.versions which lists the version of Node.js and its dependencies Modify device in a callback

Request information

Details about the request can be helpful to reproduce errors.

Browser

Data Default value Preventing collection
Client IP The IP address Configure collectUserIp
Request URL The URL including query parameters Modify request in a callback

Node.js

Data Default value Preventing collection
URL The full URL requested by the client Modify request in a callback
Path The URL path of the request Modify request in a callback
HTTP method The request method, e.g. GET, POST Modify request in a callback
HTTP version The version of HTTP used in the client request Modify request in a callback
Headers The HTTP request headers Modify request in a callback
Query The parsed query string Modify request in a callback
Body The request body Modify request in a callback
Parameters The parameters as defined by the route handler Modify request in a callback
Connection Info from the underlying TCP connection: remoteAddress, remotePort, bytesRead, bytesWritten, localPort, localAddress and IPVersion Modify request in a callback

Breadcrumbs are automatically recorded for common actions and can be helpful to reproduce errors.

Node.js

Data Default value Preventing collection
Console message The message sent to the console and its severity Set enabledBreadcrumbTypes or modify/discard the breadcrumb in an onBreadcrumb callback

Browser

Data Default value Preventing collection
Console message The message sent to the console and its severity Set enabledBreadcrumbTypes or modify/discard the breadcrumb in an onBreadcrumb callback
User interactions The selector of the element which was clicked and its text value Set enabledBreadcrumbTypes or modify/discard the breadcrumb in an onBreadcrumb callback
Navigation The URL, page title and history state when navigation occurs Set enabledBreadcrumbTypes or modify/discard the breadcrumb in an onBreadcrumb callback
Network requests The URL requested and the status code returned Set enabledBreadcrumbTypes or modify/discard the breadcrumb in an onBreadcrumb callback

Error information

Modifying error information may affect error grouping.

Browser

Data Default value Preventing collection
Context The pathname of the URL Modify context in a callback
Error class The class of the error that occurred Modify errors[].errorClass in a callback
Error message The message of the error that occurred Modify errors[].errorMessage in a callback
Inline script content The contents of an inline script where an error occurred Modify errors[].stacktrace in a callback
Stack trace The URL of the file where the error occurred, method and line number Modify errors[].stacktrace in a callback

Node.js

Data Default value Preventing collection
Context The pathname or full URL (only when handling a request) Modify context in a callback
Error class The class of the error that occurred Modify errors[].errorClass in a callback
Error message The message of the error that occurred Modify errors[].errorMessage in a callback
Stack trace The URL of the file where the error occurred, method and line number and surrounding code Modify errors[].stacktrace in a callback