lib/appsignal/transaction.rb in appsignal-0.8.13 vs lib/appsignal/transaction.rb in appsignal-0.8.14
- old
+ new
@@ -113,20 +113,21 @@
def to_hash
Formatter.new(self).to_hash
end
def complete!
- Appsignal.logger.debug("Completing transaction: #{@request_id}")
Thread.current[:appsignal_transaction_id] = nil
- current_transaction = Appsignal.transactions.delete(@request_id)
+ Appsignal.transactions.delete(@request_id)
if process_action_event || exception?
if Appsignal::Pipe.current
+ Appsignal.logger.debug("Writing transaction to pipe: #{@request_id}")
Appsignal::Pipe.current.write(self)
else
- Appsignal.enqueue(current_transaction)
+ Appsignal.logger.debug("Enqueueing transaction: #{@request_id}")
+ Appsignal.enqueue(self)
end
else
- Appsignal.logger.debug("No process_action_event or exception: #{@request_id}")
+ Appsignal.logger.debug("Not processing transaction: #{@request_id}")
end
end
def set_background_queue_start
queue_start = process_action_event.payload[:queue_start]