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.
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 |
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 | Override the report’s context using a callback or custom middleware |
Information about the application can be useful to identify if an error occurs in certain versions.
Data | Default value | Preventing collection |
---|---|---|
Type | The request type i.e. HTTP or Console |
Override using app type configuration option |
Release stage | The value of SYMFONY_ENV |
Override using the release stage configuration option |
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 URI of the request | 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 | Filter userAgent using metadata filters |
Headers | The request’s headers in an array | Filter headers using metadata filters |
Details about a console-run PHP script can be helpful to reproduce errors.
The command
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 command
metadata to null
.
Data | Default value | Preventing collection |
---|---|---|
Name | The name of the console command | Filter name using metadata filters |
Status | The exit code of the console command | Filter status using metadata filters |
Information captured from errors in Symfony Messenger workers.
The Messenger
tab can be removed in its entirety using the addMetaData
method within a middleware or callback, setting the Message
metadata to null
.
Data | Default value | Preventing collection |
---|---|---|
Will retry | true if the message will be retried or false for the last attempt |
Filter willRetry using metadata filters |
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 | Filter session using metadata filters |
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 username of an authenticated user, or the request’s IP | Override using the setUser method within a middleware or callback |