Module: Datadog::Contrib::Racecar::Patcher

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

Overview

Patcher enables patching of ‘racecar’ module.

Class Method Summary collapse

Methods included from Patcher

included

Class Method Details

.patchObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/ddtrace/contrib/racecar/patcher.rb', line 19

def patch
  do_once(:racecar) do
    begin
      # Subscribe to Racecar events
      Events.subscribe!
    rescue StandardError => e
      Datadog::Tracer.log.error("Unable to apply Racecar integration: #{e}")
    end
  end
end

.patched?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/ddtrace/contrib/racecar/patcher.rb', line 15

def patched?
  done?(:racecar)
end