Our Ruby library has gone through some major improvements and there are a few changes required to use the new integrations
Support for notifying Bugsnag of deployments has been separated into a separate
gem named bugsnag-capistrano. See the integration
guide for more information.
Configuration.use_sslhas been removed. Include the preferred protocol inConfiguration.endpointinstead.Bugsnag.configure do |config| - config.use_ssl = true - config.endpoint = 'myserver.example.com' + config.endpoint = 'https://myserver.example.com' end
Configuration.ignore_classesnow no longer accepts strings. Use classes directly instead.Configuration.delay_with_resquehas been removedConfiguration.vendor_pathshas been removedConfiguration.params_filtershas been renamed toConfiguration.meta_data_filtersto be clearerConfiguration.proxy_hostwill now default toENV['http_proxy']if set. It can still be manually set.
-
notifynow only supports block syntax. Replace usage of the overrides hash with a block- Bugsnag.notify(e, {severity: 'info'}) + Bugsnag.notify(e) do |report| + report.severity = 'info' + end
-
Bugsnag.notify_or_ignoreandBugsnag.auto_notifyhave been removed. Callnotifydirectly instead. -
after_notify_callbackshas been removed -
Bugsnag::Notificationhas been renamed toBugsnag::Report
-
config.debugboolean has been removed. Set the logger level directly+ require 'logger' Bugsnag.configure do |config| # .. set API key and other properties - config.debug = true + config.logger.level = Logger::DEBUG end
-
Log accessor functions on the
Bugsnagobject no longer exist. Logging must now be accessed through the configuration object:- Bugsnag.log "Log message" - Bugsnag.warn "Warn message" - Bugsnag.debug "Debug message" + Bugsnag.configuration.logger.info "Info message" + Bugsnag.configuration.logger.warn "Warn message" + Bugsnag.configuration.logger.debug "Debug message"
-
If you previously accessed objects directly through
notification.exceptions, this has now moved tonotification.raw_exceptionsclass ExampleMiddleware def initialize(bugsnag) @bugsnag = bugsnag end def call(report) - exception = report.exceptions.first + exception = report.raw_exceptions.first status = report.response.status # do stuff @bugsnag.call(report) end end