Sha256: 701eef05edbe3aed16634140fb046714f20ec27ecf208300fe3924271292a98f

Contents?: true

Size: 700 Bytes

Versions: 22

Compression:

Stored size: 700 Bytes

Contents

if defined?(::Sidekiq)
  Appsignal.logger.info('Loading Sidekiq integration')

  module Appsignal
    module Integrations
      class SidekiqPlugin
        def call(worker, item, queue)
          Appsignal.monitor_transaction(
            'perform_job.sidekiq',
            :class => item['class'],
            :method => 'perform',
            :attempts => item['retry_count'],
            :queue => item['queue'],
            :queue_start => item['enqueued_at']
          ) do
            yield
          end
        end
      end
    end
  end

  Sidekiq.configure_server do |config|
    config.server_middleware do |chain|
      chain.add Appsignal::Integrations::SidekiqPlugin
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
appsignal-0.11.8.beta.0 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.7 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.7.beta.1 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.6 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.6.beta.0 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.5 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.4 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.4.beta.0 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.3 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.2 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.1 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.0 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.0.beta.2 lib/appsignal/integrations/sidekiq.rb
appsignal-0.11.0.beta.1 lib/appsignal/integrations/sidekiq.rb
appsignal-0.10.6 lib/appsignal/integrations/sidekiq.rb
appsignal-0.10.5 lib/appsignal/integrations/sidekiq.rb
appsignal-0.10.4 lib/appsignal/integrations/sidekiq.rb
appsignal-0.10.3 lib/appsignal/integrations/sidekiq.rb
appsignal-0.10.2 lib/appsignal/integrations/sidekiq.rb
appsignal-0.10.1 lib/appsignal/integrations/sidekiq.rb