Sha256: 6396cc0eeec94012a8227ec8ff2fc164d8f73eccae9a8a1b3bacaccdf8aa1444
Contents?: true
Size: 869 Bytes
Versions: 63
Compression:
Stored size: 869 Bytes
Contents
module Appsignal class Hooks class RakeHook < Appsignal::Hooks::Hook register :rake def dependencies_present? defined?(::Rake::Task) end def install ::Rake::Task.class_eval do alias :execute_without_appsignal :execute def execute(*args) execute_without_appsignal(*args) rescue => error transaction = Appsignal::Transaction.create( SecureRandom.uuid, Appsignal::Transaction::BACKGROUND_JOB, Appsignal::Transaction::GenericRequest.new( :params => args ) ) transaction.set_action(name) transaction.set_error(error) transaction.complete Appsignal.stop('rake') raise error end end end end end end
Version data entries
63 entries across 63 versions & 1 rubygems