Describe the bug
Trying to use Sentry.capture_exception(error) to capture a StandardError and send it asynchronously , but it failed to enqueue and reported
async event sending failed: Unsupported argument type: StandardError.
The failed reason can be found here: https://github.com/rails/rails/blob/v6.0.3.4/activejob/lib/active_job/serializers.rb#L28. It seems like ActiveJob 6 can't serialize an Exception object
Expected behavior
Event should be compatible with ActiveJob 6+
Environment
- Ruby Version: 2.7.2
- SDK Version: 4.1.4
- Integration Versions (if any):
- Rails 6.0.3.4, Sidekiq 6.1.2
Sentry-ruby Config
Sentry.init do |config|
config.breadcrumbs_logger = [:active_support_logger]
config.before_send = lambda do |event, hint|
event.modules.clear
event
end
config.async = lambda { |event, hint| SentryJob.perform_later(event, hint) }
end
Describe the bug
Trying to use
Sentry.capture_exception(error)to capture a StandardError and send it asynchronously , but it failed to enqueue and reportedThe failed reason can be found here: https://github.com/rails/rails/blob/v6.0.3.4/activejob/lib/active_job/serializers.rb#L28. It seems like ActiveJob 6 can't serialize an Exception object
Expected behavior
Event should be compatible with ActiveJob 6+
Environment
Sentry-ruby Config