Module: Datadog::Contrib::Shoryuken::Patcher

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

Overview

Patcher enables patching of ‘shoryuken’ 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
# File 'lib/ddtrace/contrib/shoryuken/patcher.rb', line 16

def patch
  do_once(:shoryuken) do
    begin
      ::Shoryuken.server_middleware do |chain|
        chain.add Shoryuken::Tracer
      end
    rescue StandardError => e
      Datadog::Tracer.log.error("Unable to apply Shoryuken integration: #{e}")
    end
  end
end

.patched?Boolean

Returns:

  • (Boolean)


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

def patched?
  done?(:shoryuken)
end