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.

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.

If no user ID is set on the Bugsnag client, a Bugsnag-generated Device ID is used for the user.id property of BugsnagEvent and BugsnagSession objects. To prevent collection, set an initial value in the Bugsnag client or update the data in an event callback and a session callback block.

Device information

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

To see the data collected about a user’s device, see the device property of the BugsnagEvent and BugsnagSession objects. To prevent collection, update the data in an event callback and a session callback block.

In addition, the following data is collected and added to the metadata field of a BugsnagEvent. This data can be removed by clearing the following keys from metadata:

Section Key Description
device batteryLevel Amount of battery charge available at time of report
device simulator A boolean value which is true if the device is a simulator
device charging A boolean value which is true if the device is charging its battery
device wordSize Word size of OS (32-bit or 64-bit)
device thermalState The device’s thermal condition
device timezone The device’s timezone

Application information

Information about the application can be useful to identify if an error occurs in certain versions.

To see the data collected about your app, see the app property of the BugsnagEvent and BugsnagSession classes. To prevent collection, update the data in an event callback and a session callback block.

In addition, the following data is collected and added to the metadata field of a BugsnagEvent. This data can be removed by clearing the following keys from metadata:

Section Key Description
app memoryUsage The app’s memory footprint
app name The name of the executable, set from CFBundleExecutable

Error information

Modifying error information may affect error grouping.

To see the data collected about a captured error/signal, see the errors property of the BugsnagEvent class. To prevent collection, update the data in an event callback block.

Additional data is added to a metadata tab where possible. An nserror tab is created for NSError objects (including Swift errors) passed to notifyError. It will contain:

Section Key Description
nserror code The error code (error.code)
nserror domain The error domain (error.domain)
nserror reason The error’s failure reason
(error.localizedFailureReason)
nserror userInfo The error’s user info dictionary (error.userInfo)

An uncaught NSException, Mach-O exception or C++ exception will have an error metadata tab that contains (where applicable):

Section Key Description
error address The memory address that was being accessed when the exception was thrown
error crashInfo The message from the crashing library’s __crash_info section
error nsexception, cpp_exception, mach A dictionary of details about the original exception
error reason The reason for the error
error type The error type (nsexception, mach or cpp_exception)

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

The following breadcrumbs are collected and can be filtered/amended in a breadcrumb callback block or disabled by its type using enabledBreadcrumbTypes:

Data Type Description
NSControlTextDidBeginEditingNotification User Notification when the user begins editing a text field, including the accessibilityLabel of the control
NSControlTextDidEndEditingNotification User Notification when the user ends editing a text field, including the accessibilityLabel of the control
NSTableViewSelectionDidChangeNotification Navigation Notification when the user selects a different row in a table view
NSMenuWillSendActionNotification State Notification when a menu item action will be dispatched
NSApplicationDidBecomeActiveNotification State Notification when the application becomes active
NSApplicationDidResignActiveNotification State Notification when the application becomes inactive
NSApplicationDidHideNotification State Notification when the application becomes hidden
NSApplicationDidUnhideNotification State Notification when the application becomes unhidden
NSApplicationWillTerminateNotification State Notification when the application will terminate
NSWorkspaceScreensDidSleepNotification State Notification when the device screen goes to sleep
NSWorkspaceScreensDidWakeNotification State Notification when the device screen wakes from sleep
NSWindowWillCloseNotification State Notification when the window is about to close
NSWindowDidBecomeKeyNotification State Notification when the window becomes the key window
NSWindowWillMiniaturizeNotification State Notification when the window will miniaturize
NSWindowDidEnterFullScreenNotification State Notification when the window will enter full screen
NSWindowDidExitFullScreenNotification State Notification when the window will exit full screen
NSUndoManagerDidUndoChangeNotification State Notification when an undo operation occurs
NSUndoManagerDidRedoChangeNotification State Notification when a redo operation occurs
NSHTTPURLResponse Request (success) HTTP Response status code in range 100 - 399
NSHTTPURLResponse Request (failed) HTTP Response status code in range 400 - 499
NSHTTPURLResponse Request (error) HTTP Response status code not in range 100 - 499 or no response received

Request type breadcrumbs are only captured when the BugsnagNetworkRequestPlugin is installed and enabled.