class Sentry::Rails::Tracing::AbstractSubscriber

def subscribe_to_event(event_name)

def subscribe_to_event(event_name)
  if ::Rails.version.to_i == 5
    ActiveSupport::Notifications.subscribe(event_name) do |*args|
      next unless Tracing.get_current_transaction
      event = ActiveSupport::Notifications::Event.new(*args)
      yield(event_name, event.duration, event.payload)
    end
  else
    ActiveSupport::Notifications.subscribe(event_name) do |event|
      next unless Tracing.get_current_transaction
      yield(event_name, event.duration, event.payload)
    end
  end
end