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.

Device information

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

Data Default value Preventing collection
Hostname The hostname of the PHP instance, as returned by php_uname Override using setHostname in your configuration

Error information

Modifying error information may affect error grouping.

Data Default value Preventing collection
Error class The exception’s class name Override the error data within a report using a callback and the setName method
Error message The exception’s message Override the error data within a report using a callback and the setMessage method
Stack trace A stack trace derived from the exception, containing code, filenames, methods and line numbers Override the error data within a report using a callback and the getStacktrace method. To disable collecting code snippets, use setSendCode
Context The request method and path, or whether a tracked job has been resolved Override the report’s context using a callback or custom middleware

Application information

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

Data Default value Preventing collection
Type The PHP run or server API type as determined by php_sapi_name Override using setAppType within your configuration
Release stage The $app->environment value Override using setReleaseStage within your configuration

Request information

Details about the request can be helpful to reproduce errors.

The request tab will only be present in the event of an HTTP request. This tab can be removed in its entirety using the addMetaData method within a middleware or callback, setting the request metadata to null.

Data Default value Preventing collection
URL The full requested URL Filter url using metadata filters
HTTP Method The request method used Filter httpMethod using metadata filters
Parameters The parameters input with the request Filter params using metadata filters
Client IP The remote client IP of the request Filter clientIp using metadata filters
User Agent The content of the user agent header if present Filter userAgent using metadata filters
Headers The request’s headers in an array Filter headers using metadata filters

Job information

Details about a Lumen job can be helpful to reproduce errors.

The job tab will only be present in the event of a Lumen job error. This tab can be removed in its entirety using the addMetaData method within a middleware or callback, setting the job metadata to null.

Data Default value Preventing collection
Name The tracked job’s name Filter name using metadata filters
Queue The tracked job’s queue Filter queue using metadata filters
Attempts The tracked job’s run attempts Filter attempts using metadata filters
Connection The tracked job’s connection name Filter connection using metadata filters
Resolved Whether a tracked job has been resolved Filter resolved using metadata filters

Request session information

Stored session data for the current request, if any.

The “session” tab can be removed in its entirety using the addMetaData method within a middleware or callback, setting the session metadata to null.

Data Default value Preventing collection
Session Any stored session information as an array Filter session using metadata filters

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.

Data Default value Preventing collection
User An array constructed from the currently logged in user according to $app->auth->user Override using the setUser method within a middleware or callback
ID The remote IP in the case of an HTTP request Override using the setUser method within a middleware or callback

Attaches stored cookie data when a request has been made.

This tab can be removed in its entirety using the addMetaData method within a middleware or callback, setting the cookies metadata to null.

Data Default value Preventing collection
Cookies Any received cookie information in an array Filter cookies using metadata filters

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

Logging breadcrumbs

If a message is logged, but no error is reported, a breadcrumb will be created, as described here.

Query breadcrumbs

Query breadcrumbs are automatically collected whenever a database query is made. This collection can be disabled by setting the BUGSNAG_QUERY environment variable to false.

Data Default value Preventing collection
SQL The SQL query being executed Disable query breadcrumbs using the BUGSNAG_QUERY variable as described above
Binding The parameter bindings used when executing the query Disable query breadcrumbs using the BUGSNAG_QUERY variable as described above
Time The time the query was executed Disable query breadcrumbs using the BUGSNAG_QUERY variable as described above
Connection The connection name Disable query breadcrumbs using the BUGSNAG_QUERY variable as described above