Sha256: baf0d120243437a9d17cce1937b386bfeadda6546bf4dbc54cfb9375b636a2bc
Contents?: true
Size: 902 Bytes
Versions: 4
Compression:
Stored size: 902 Bytes
Contents
# typed: true require 'datadog/core/utils/only_once' require 'datadog/tracing/contrib/patcher' require 'datadog/tracing/contrib/presto/ext' require 'datadog/tracing/contrib/presto/instrumentation' module Datadog module Tracing module Contrib module Presto # Patcher enables patching of 'presto-client' module. module Patcher include Contrib::Patcher PATCH_ONLY_ONCE = Core::Utils::OnlyOnce.new module_function def patched? PATCH_ONLY_ONCE.ran? end def patch PATCH_ONLY_ONCE.run do begin ::Presto::Client::Client.include(Instrumentation::Client) rescue StandardError => e Datadog.logger.error("Unable to apply Presto integration: #{e}") end end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems