lib/appsignal/transaction.rb in appsignal-0.6.3 vs lib/appsignal/transaction.rb in appsignal-0.6.4

- old
+ new

@@ -14,10 +14,11 @@ HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_CONNECTION HTTP_USER_AGENT HTTP_FROM HTTP_NEGOTIATE HTTP_PRAGMA HTTP_REFERER).freeze def self.create(key, env) + Appsignal.logger.debug("Creating transaction: #{key}") Thread.current[:appsignal_transaction_id] = key Appsignal.transactions[key] = Appsignal::Transaction.new(key, env) end def self.current @@ -106,13 +107,16 @@ def to_hash TransactionFormatter.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) if process_action_event || exception? Appsignal.enqueue(current_transaction) + else + Appsignal.logger.debug("No process_action_event or exception: #{@request_id}") end end protected