Sha256: 9efef2e362150bc267129416910aef62f7187c8d3f3a72387359e2b71525d503

Contents?: true

Size: 593 Bytes

Versions: 39

Compression:

Stored size: 593 Bytes

Contents

# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2021

module Instana
  module Activators
    class SidekiqWorker < Activator
      def can_instrument?
        defined?(::Sidekiq) && ::Sidekiq.respond_to?(:configure_server) && ::Instana.config[:'sidekiq-worker'][:enabled]
      end

      def instrument
        require 'instana/instrumentation/sidekiq-worker'

        ::Sidekiq.configure_server do |cfg|
          cfg.server_middleware do |chain|
            chain.add ::Instana::Instrumentation::SidekiqWorker
          end
        end

        true
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
instana-1.217.1 lib/instana/activators/sidekiq_worker.rb
instana-1.217.0 lib/instana/activators/sidekiq_worker.rb
instana-1.216.0 lib/instana/activators/sidekiq_worker.rb
instana-1.215.1 lib/instana/activators/sidekiq_worker.rb
instana-1.215.0 lib/instana/activators/sidekiq_worker.rb
instana-1.214.4 lib/instana/activators/sidekiq_worker.rb
instana-1.214.3 lib/instana/activators/sidekiq_worker.rb
instana-1.214.2 lib/instana/activators/sidekiq_worker.rb
instana-1.214.1 lib/instana/activators/sidekiq_worker.rb
instana-1.214.0 lib/instana/activators/sidekiq_worker.rb
instana-1.213.3 lib/instana/activators/sidekiq_worker.rb
instana-1.213.2 lib/instana/activators/sidekiq_worker.rb
instana-1.213.1 lib/instana/activators/sidekiq_worker.rb
instana-1.213.0 lib/instana/activators/sidekiq_worker.rb
instana-1.212.0 lib/instana/activators/sidekiq_worker.rb
instana-1.209.6 lib/instana/activators/sidekiq_worker.rb
instana-1.209.5 lib/instana/activators/sidekiq_worker.rb
instana-1.209.4 lib/instana/activators/sidekiq_worker.rb
instana-1.209.3 lib/instana/activators/sidekiq_worker.rb
instana-1.209.2 lib/instana/activators/sidekiq_worker.rb