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 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

Context information

The Laravel Context tab is added when Laravel 11’s context feature is being used. This tab can be removed in its entirety using the addMetaData method within a middleware or callback, setting the Laravel Context metadata to null.

Hidden Context information

The Laravel Hidden Context tab is added when Laravel 11’s context feature is being used and the attach_hidden_context configuration option is enabled. This tab can be removed in its entirety by the disabling attach_hidden_context configuration option or using the addMetaData method within a middleware or callback, setting the Laravel Hidden Context metadata to null.

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 Redact url using redactedKeys
HTTP Method The request method used Redact httpMethod using redactedKeys
Parameters The parameters input with the request Redact params using redactedKeys
Client IP The remote client IP of the request Redact clientIp using redactedKeys
User Agent The content of the user agent header if present Redact userAgent using redactedKeys
Headers The request’s headers in an array Redact headers using redactedKeys

Job information

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

The job tab will only be present in the event of a Laravel 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 Redact name using redactedKeys
Queue The tracked job’s queue Redact queue using redactedKeys
Attempts The tracked job’s run attempts Redact attempts using redactedKeys
Connection The tracked job’s connection name Redact connection using redactedKeys
Resolved Whether a tracked job has been resolved Redact resolved using redactedKeys

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 Redact session using redactedKeys

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

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