lib/appsignal/subscriber.rb in appsignal-0.12.rc.14 vs lib/appsignal/subscriber.rb in appsignal-1.0.0.rc.1
- old
+ new
@@ -29,17 +29,17 @@
# https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications/fanout.rb#L49
end
def start(name, id, payload)
return unless transaction = Appsignal::Transaction.current
- return if transaction.paused?
+ return if transaction.nil_transaction? || transaction.paused?
Appsignal::Extension.start_event(transaction.transaction_index)
end
def finish(name, id, payload)
return unless transaction = Appsignal::Transaction.current
- return if transaction.paused?
+ return if transaction.nil_transaction? || transaction.paused?
title, body = Appsignal::EventFormatter.format(name, payload)
Appsignal::Extension.finish_event(
transaction.transaction_index,
name,