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 freeMemory How much additional memory the app may allocate before reaching its memory limit, as reported by os_proc_available_memory()
app memoryLimit The app’s memory limit
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
UITextFieldTextDidBeginEditingNotification User Notification when the user begins editing a text field, including the accessibilityLabel of the control
UITextViewTextDidBeginEditingNotification User Notification when the user begins editing a text view, including the accessibilityLabel of the control
UITextFieldTextDidEndEditingNotification User Notification when the user ends editing a text field, including the accessibilityLabel of the control
UITextViewTextDidEndEditingNotification User Notification when the user ends editing a text field, including the accessibilityLabel of the control
UITableViewSelectionDidChangeNotification Navigation Notification when the user selects a different row in a table view
UIWindowDidBecomeHiddenNotification State Notification when the window becomes hidden
UIWindowDidBecomeVisibleNotification State Notification when the window becomes visible
UIApplicationWillTerminateNotification State Notification when the application will terminate
UIApplicationWillEnterForegroundNotification State Notification when the application will enter the foreground
UIApplicationDidEnterBackgroundNotification State Notification when the application will enter the background
UIApplicationDidReceiveMemoryWarningNotification State Notification when the application will receive a memory warning
UIKeyboardDidShowNotification State Notification when the application shows the keyboard
UIKeyboardDidHideNotification State Notification when the application hides the keyboard
UIMenuControllerDidShowMenuNotification State Notification when a menu controller shows a menu
UIMenuControllerDidHideMenuNotification State Notification when a menu controller hides a menu
NSProcessInfoThermalStateDidChangeNotification State Notification when the thermal state of the device changed
NSUndoManagerDidUndoChangeNotification State Notification when an undo operation occurs
NSUndoManagerDidRedoChangeNotification State Notification when a redo operation occurs
UIApplicationUserDidTakeScreenshotNotification State Notification when the user takes a screenshot
UIDeviceOrientationDidChangeNotification State Notification when the device orientation changes
UISceneWillConnectNotification State Notification when UIKit adds a scene to the app
UISceneDidDisconnectNotification State Notification when UIKit removes a scene from the app
UISceneDidActivateNotification State Notification when a scene is onscreen and responding to user events
UISceneWillDeactivateNotification State Notification when a scene is about to resign active state and stop responding to user events
UISceneWillEnterForegroundNotification State Notification when a scene is about to run in foreground and become visible to user
UISceneDidEnterBackgroundNotification State Notification when a scene is running in background and no longer onscreen
UITableViewSelectionDidChangeNotification State Notification when selected row in posting table view changes
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.