Skip to content

Sentry 4.0 incompatibility with ActiveSupport::Notifications.publish #1131

@agrobbin

Description

@agrobbin

Describe the bug

When testing our upgrade to Sentry 4.0, we ran into an issue with another dependency calling ActiveSupport::Notifications.publish and Sentry's ActiveSupportLogger trying to call to_i on a non-Time object. In this case, it is Active Admin's load! method, though I'd imagine any use of ActiveSupport::Notifications.publish will cause a similar issue.

To Reproduce

Call ActiveSupport::Notifications.publish.

Expected behavior

ActiveSupportLogger should not raise an exception.

Actual behavior

ActiveSupportLogger raises an undefined method 'to_i' exception.

Environment

  • Ruby Version: 2.7.2
  • SDK Version: 4.0.0
  • Integration Versions (if any):
  • Rails 6.0.3.4
  • Active Admin 2.8.1

Raven Config

This is not necessary but could be helpful.

Sentry.init do |config|
  # Send Sentry notifications asynchronously by default
  config.async = ->(event) { SentryJob.perform_later(event) }

  config.breadcrumbs_logger = [:active_support_logger]
end

Metadata

Metadata

Assignees

Labels

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions