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 5+ of the BugSnag Android 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.

If no user ID is set on the Bugsnag client, a BugSnag-generated Device ID is used for the user.id property of Event and Session objects. To prevent collection, set an initial value in the Bugsnag client or update the data in an OnErrorCallback and OnSessionCallback.

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 Event and Session classes. To prevent collection, update the data in an OnErrorCallback and OnSessionCallback.

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

Section Key Description
device batteryLevel The battery level on the device when the event occurred
device brand The brand of device
device charging Whether the device was charging when the event occurred
device dpi The screen density scaling factor of the device in DPI
device emulator Whether the device was an emulator
device locationStatus The status of location services when the event occurred
device networkAccess The type of network in use on the device when the event occurred
device screenDensity The screen density scaling factor of the device
device screenResolution The resolution of the device’s screen

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 Event and Session classes. To prevent collection, update the data in an OnErrorCallback and OnSessionCallback.

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

Section Key Description
app activeScreen The screen name of the current foreground Activity
app backgroundWorkRestricted Whether the user has enabled background work restrictions. This determines whether scheduled jobs and alarms can execute
app freeMemory The amount of memory available to be allocated by the app (in bytes)
app lowMemory Whether the system is running in a low memory situation
app memoryLimit The maximum amount of memory which can be allocated by the app (in bytes)
app memoryTrimLevel The most recently received memory trim level
app memoryUsage The amount of memory allocated by the app (totalMemory - freeMemory)
app name The name of the app from the manifest
app processName The process name from the manifest
app totalMemory The amount of memory allocated by the Android Runtime (in bytes)

Error information

Modifying error information may affect error grouping.

To see the data collected about a captured error (Throwable), see the errors property of the Event class. To prevent collection, update the data in an OnErrorCallback.

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 an OnBreadcrumbCallback or disabled by its type using enabledBreadcrumbTypes:

Data Type Description
onActivityCreated State When an Activity receives the onCreate lifecycle callback
onActivityStarted State When an Activity receives the onStart lifecycle callback
onActivityResumed State When an Activity receives the onResume lifecycle callback
onActivityPaused State When an Activity receives the onPause lifecycle callback
onActivityStopped State When an Activity receives the onStop lifecycle callback
onActivitySaveInstanceState State When an Activity receives the onSaveInstanceState lifecycle callback
onActivityDestroyed State When an Activity receives the onDestroy lifecycle callback
onTrimMemory State When the application receives the onTrimMemory callback
android.appwidget.action.APPWIDGET_DELETED User When an AppWidget is deleted by its host
android.appwidget.action.APPWIDGET_DISABLED User When an AppWidget is disabled by the last host
android.appwidget.action.APPWIDGET_ENABLED User When an AppWidget is enabled in a host for the first time
android.appwidget.action.APPWIDGET_HOST_RESTORED State When an AppWidget is restored in its host from a backup (sent to host)
android.appwidget.action.APPWIDGET_RESTORED State When an AppWidget is restored in its host from a backup (sent to provider)
android.appwidget.action.APPWIDGET_UPDATE State When an AppWidget should be updated
android.appwidget.action.APPWIDGET_UPDATE_OPTIONS State When an AppWidget’s extras change
android.intent.action.ACTION_POWER_CONNECTED State When the device is connected to power
android.intent.action.ACTION_POWER_DISCONNECTED State When the device is disconnected from power
android.intent.action.ACTION_SHUTDOWN State When the device is about to shutdown
android.intent.action.AIRPLANE_MODE State When the device switches in or out of airplane mode
android.intent.action.BATTERY_LOW State When the device enters a low battery state
android.intent.action.BATTERY_OKAY State When the device exits a low battery state
android.intent.action.BOOT_COMPLETED State When the device completes its boot sequence
android.intent.action.CAMERA_BUTTON User When the device camera button is pressed
android.intent.action.CLOSE_SYSTEM_DIALOGS User When a user action requests dismissal of a system dialog
android.intent.action.CONFIGURATION_CHANGED State When the configuration changes (e.g. locale, orientation)
android.intent.action.CONTENT_CHANGED State When the content of specified URIs changes
android.intent.action.DATE_CHANGED State When the device date changes
android.intent.action.DEVICE_STORAGE_LOW State When the device storage is running low
android.intent.action.DEVICE_STORAGE_OK State When the device storage is no longer running low
android.intent.action.DOCK_EVENT User When the device dock state changes
android.intent.action.DREAMING_STARTED Navigation When the system has started dreaming
android.intent.action.DREAMING_STOPPED Navigation When the system has stopped dreaming
android.intent.action.INPUT_METHOD_CHANGED State When the device input method changes
android.intent.action.LOCALE_CHANGED State When the device locale changes
android.intent.action.REBOOT State When a reboot has been requested
android.intent.action.SCREEN_OFF State When the device switches its screen off
android.intent.action.SCREEN_ON State When the device switches its screen on
android.intent.action.TIMEZONE_CHANGED State When the device timezone changes
android.intent.action.TIME_SET State When the device time is set
android.os.action.DEVICE_IDLE_MODE_CHANGED State When the device idle mode changes
android.os.action.POWER_SAVE_MODE_CHANGED State When the device power save mode changes
okhttp3.EventListener.callEnd Request An HTTP call has completed
okhttp3.EventListener.callFailed Request An HTTP call has failed
okhttp3.EventListener.cancelled Request An HTTP call has been cancelled

Request type breadcrumbs are only captured when the BugsnagOkHttpPlugin is installed.