module Datadog::Contrib::Presto::Patcher

Patcher enables patching of 'presto-client' module.

Public Instance Methods

patch() click to toggle source
# 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?() click to toggle source
# File lib/ddtrace/contrib/presto/patcher.rb, line 14
def patched?
  done?(:presto)
end