Sha256: 7504f2f6204eb277f643904f6f487ffaf5c5dd2e51a4ef4ecb722ddf551b9ae0
Contents?: true
Size: 998 Bytes
Versions: 4
Compression:
Stored size: 998 Bytes
Contents
# typed: true require 'datadog/core/utils/only_once' require 'datadog/tracing/contrib/httpclient/instrumentation' require 'datadog/tracing/contrib/patcher' module Datadog module Tracing module Contrib # Datadog Httpclient integration. module Httpclient # Patcher enables patching of 'httpclient' module. module Patcher include Contrib::Patcher PATCH_ONLY_ONCE = Core::Utils::OnlyOnce.new module_function def patched? PATCH_ONLY_ONCE.ran? end def target_version Integration.version end # patch applies our patch def patch PATCH_ONLY_ONCE.run do begin ::HTTPClient.include(Instrumentation) rescue StandardError => e Datadog.logger.error("Unable to apply httpclient integration: #{e}") end end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems