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
Runtime versions The version of PHP and supported frameworks in use Modify metadata.device in a callback

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 URI, or run command in the case of a console instance 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

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 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 request’s HTTP_X_FORWARDED_FOR or REMOTE_ADDR information Filter clientIp using metadata filters
User Agent The HTTP_USER_AGENT value for the request Filter userAgent using metadata filters
Headers The request’s headers in an array Filter headers using metadata filters

Console information

Details about a console-run PHP script can be helpful to reproduce errors.

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

Data Default value Preventing collection
Command The command run without arguments Filter Command using metadata filters
Input The full command string Filter Input using metadata filters
Arguments An array of arguments provided to the command Filter Arguments using metadata filters
Options An array of options provided to the command Filter Options using metadata filters

Session information

Attaches session data stored in $_SESSION when a PHP request has been made.

This 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 information stored in the $_SESSION 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
Id The request’s HTTP_X_FORWARDED_FOR or REMOTE_ADDR information Override using the setUser method within a middleware or callback