Module: Datadog::Contrib::Presto::Patcher

Includes:
Datadog::Contrib::Patcher
Defined in:
lib/ddtrace/contrib/presto/patcher.rb

Overview

Patcher enables patching of ‘presto-client’ module.

Class Method Summary collapse

Methods included from Datadog::Contrib::Patcher

included

Class Method Details

.patchObject



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

def patch
  do_once(:presto) do
    begin
      ::Presto::Client::Client.send(:include, Instrumentation::Client)
    rescue StandardError => e
      Datadog.logger.error("Unable to apply Presto integration: #{e}")
    end
  end
end

.patched?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/ddtrace/contrib/presto/patcher.rb', line 14

def patched?
  done?(:presto)
end