Module: Datadog::Contrib::Sidekiq::Patcher

Includes:
Patcher
Defined in:
lib/ddtrace/contrib/sidekiq/patcher.rb

Overview

Patcher enables patching of ‘sidekiq’ module.

Class Method Summary collapse

Methods included from Patcher

included

Class Method Details

.patchObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/ddtrace/contrib/sidekiq/patcher.rb', line 16

def patch
  require 'ddtrace/contrib/sidekiq/client_tracer'
  ::Sidekiq.configure_client do |config|
    config.client_middleware do |chain|
      chain.add(Sidekiq::ClientTracer)
    end
  end

  require 'ddtrace/contrib/sidekiq/server_tracer'
  ::Sidekiq.configure_server do |config|
    config.server_middleware do |chain|
      chain.add(Sidekiq::ServerTracer)
    end
  end
end

.target_versionObject



12
13
14
# File 'lib/ddtrace/contrib/sidekiq/patcher.rb', line 12

def target_version
  Integration.version
end