Sha256: 185371f257f088033add291ad577e14623f280ecbc7ec9bb8a5794af500fa948
Contents?: true
Size: 1.3 KB
Versions: 184
Compression:
Stored size: 1.3 KB
Contents
# frozen_string_literal: true module Appsignal module Integrations # @api private module ResqueIntegration def perform transaction = Appsignal::Transaction.create( SecureRandom.uuid, Appsignal::Transaction::BACKGROUND_JOB, Appsignal::Transaction::GenericRequest.new({}) ) Appsignal.instrument "perform.resque" do super end rescue Exception => exception # rubocop:disable Lint/RescueException transaction.set_error(exception) raise exception ensure if transaction transaction.set_action_if_nil("#{payload["class"]}#perform") args = Appsignal::Utils::HashSanitizer.sanitize( ResqueHelpers.arguments(payload), Appsignal.config[:filter_parameters] ) transaction.params = args if args transaction.set_tags("queue" => queue) Appsignal::Transaction.complete_current! end Appsignal.stop("resque") end end class ResqueHelpers def self.arguments(payload) case payload["class"] when "ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper" nil # Set in the ActiveJob integration else payload["args"] end end end end end
Version data entries
184 entries across 184 versions & 1 rubygems