Sha256: c90c5d32f17c5b2da54e8e275de08c6ce89977b4f69b908d1ca231756c9bd3db
Contents?: true
Size: 801 Bytes
Versions: 3
Compression:
Stored size: 801 Bytes
Contents
require 'ddtrace/contrib/patcher' require 'ddtrace/contrib/presto/ext' require 'ddtrace/contrib/presto/instrumentation' require 'ddtrace/utils/only_once' module Datadog module Contrib module Presto # Patcher enables patching of 'presto-client' module. module Patcher include Contrib::Patcher PATCH_ONLY_ONCE = Datadog::Utils::OnlyOnce.new module_function def patched? PATCH_ONLY_ONCE.ran? end def patch PATCH_ONLY_ONCE.run do begin ::Presto::Client::Client.send(:include, Instrumentation::Client) rescue StandardError => e Datadog.logger.error("Unable to apply Presto integration: #{e}") end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ddtrace-0.49.0 | lib/ddtrace/contrib/presto/patcher.rb |
ddtrace-0.48.0 | lib/ddtrace/contrib/presto/patcher.rb |
ddtrace-0.47.0 | lib/ddtrace/contrib/presto/patcher.rb |