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.

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 primary app framework Override the app_type property during BugSnag configuration

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 server Override the hostname property during BugSnag configuration
Runtime versions The version of Ruby and supported frameworks in use Modify metadata.device in a callback

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.

Default user data

Data Default value Preventing collection
Id The remote_ip of the incoming request Override the event’s user using a callback or custom middleware

Warden and Clearance user data

This data will only be collected if a Warden or Clearance plugin is being used with your Rails server. The same data is collected from both Warden and Clearance, so overriding methods noted below will work with either plugin.

Data Default value Preventing collection
Email The user’s email address Override the event’s user using a callback or custom middleware
Name The user’s username Override the event’s user using a callback or custom middleware
First name The user’s first name Override the event’s user using a callback or custom middleware
Last name The user’s last name Override the event’s user using a callback or custom middleware
Created at The time the user was created Override the event’s user using a callback or custom middleware
Id The Warden or Clearance user ID Override the event’s user using a callback or custom middleware

Request information

Details about the request can be helpful to reproduce errors.

This tab can be removed in its entirety using the clear_metadata method within a middleware or callback.

Data Default value Preventing collection
URL The requested URL in full Filter url using redacted_keys
HTTP Method The method used by the request Filter httpMethod using redacted_keys
HTTP Version The HTTP version used by the request Filter httpVersion using redacted_keys
Referer The HTTP referer that originally accessed the resource Filter referer using redacted_keys
Headers Any headers provided by the request Filter headers using redacted_keys
Cookies The cookies attached to the request Filter cookies using redacted_keys. Filtered by default
Body The parsed request body if the request contained form data or JSON Filter body using redacted_keys
Rails action The controller name and action Filter railsAction using redacted_keys
Params The query parameters and body supplied by the request Filter params using redacted_keys
Client IP The remote_ip of the incoming request Filter clientIp using redacted_keys
Request ID The uuid generated at the beginning of a request Filter requestId using redacted_keys

Environment information

Information about the environment can be useful for finding platform or device issues.

Data Default value Preventing collection
Rails Version The version of Rails currently running Ensure the send_environment configuration option is false

In addition, the environment tab will be populated with all environment data provided by Rack. The tab will only be collected if the configuration option send_environment is set to true.

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 an event using a callback and the exceptions method
Error message The exception’s message Override the error data within an event using a callback and the exceptions method
Stack trace A stack trace derived from the exception, containing code, filenames, methods and line numbers Override the error data within an event using a callback and the exceptions method
Context The controller name and action or Active Job task name and queue Override the event’s context using a callback or custom middleware

Active Job information

BugSnag automatically captures data about Active Job tasks in an active_job metadata tab. This is only captured when using a queue adapter that does not have a specific integration.

This tab can be removed in its entirety using the clear_metadata method within a middleware or callback.

Data Default value Preventing collection
Job ID The ID for the job Filter job_id using redacted_keys
Provider Job ID The ID assigned to the job by some queue backends Filter provider_job_id using redacted_keys
Job Name The job class name Filter job_name using redacted_keys
Queue The queue the job is running under Filter queue using redacted_keys
Priority The priority of the job Filter priority using redacted_keys
Arguments An array of arguments provided to the job Filter arguments using redacted_keys
Number of Executions The number of times the job has executed Filter executions using redacted_keys
Enqueued At The time the job was enqueued Filter enqueued_at using redacted_keys
Locale The locale used by the job Filter locale using redacted_keys
Timezone The timezone used by the job Filter timezone using redacted_keys

ActiveSupport breadcrumbs

Breadcrumbs contain information that can help you track down the root cause of errors.

BugSnag automatically adds a subscriber to certain ActiveSupport events, creating a breadcrumb for each.

While sensitive data, such as SQL queries or ActiveMailer messages, will not be captured, all breadcrumbs can be filtered as described in the discarding and amending breadcrumbs section.

A full list of the ActiveSupport breadcrumbs and data captured can be found in the table below.

event id breadcrumb message type captured metaData
perform_action.action_cable Perform ActionCable PROCESS channel_class, action
perform.active_job Perform ActiveJob PROCESS
cache_read.active_support Read cache PROCESS key, hit, super_operation
cache_fetch_hit.active_support Fetch cache hit PROCESS key
sql.active_record ActiveRecord SQL query PROCESS name, connection_id, cached, binds
start_processing.action_controller Controller started processing REQUEST controller, action, method, path
process_action.action_controller Controller action processed REQUEST controller, action, method, status, view_runtime, db_runtime
redirect_to.action_controller Controller redirect REQUEST status, location
halted_callback.action_controller Controller halted via callback REQUEST filter
render_template.action_view ActionView template rendered REQUEST identifier, layout
render_partial.action_view ActionView partial rendered REQUEST identifier
deliver.action_mailer ActionMail delivered REQUEST mailer, message_id, from, date, perform_deliveries

Bindings data

The binds metadata captured in a breadcrumb will only ever contain keys used in a query, never values.

Mongo breadcrumbs

Breadcrumbs contain information that can help you track down the root cause of errors.

BugSnag will automatically add a subscriber if the Mongo ruby driver gem is detected, allowing breadcrumbs to be captured with each transaction.

All breadcrumbs can be filtered as described in the discarding and amending breadcrumbs section.

A full list of the Mongo breadcrumbs and data captured can be found in the table below.

event id breadcrumb message type captured metaData
succeeded Mongo query succeeded PROCESS command_name, database_name, operation_id, request_id, duration, collection, filters
failed Mongo query failed PROCESS command_name, database_name, operation_id, request_id, duration, message, collection, filters

Filter Data

The filters metadata captured in a breadcrumb will only ever contain keys used in a query, never values.