Sha256: 7bd4133ae9a0f0a9916eeb53dd0b4fd2979b2dd4fb478246b3c26f2bef0fc3bf

Contents?: true

Size: 630 Bytes

Versions: 4

Compression:

Stored size: 630 Bytes

Contents

# typed: false

require 'datadog/tracing/contrib/patcher'

module Datadog
  module Tracing
    module Contrib
      module Excon
        # Patcher enables patching of 'excon' module.
        module Patcher
          include Contrib::Patcher

          module_function

          def target_version
            Integration.version
          end

          def patch
            require 'datadog/tracing/contrib/excon/middleware'
            add_middleware
          end

          def add_middleware
            ::Excon.defaults[:middlewares] = Middleware.around_default_stack
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ddtrace-1.2.0 lib/datadog/tracing/contrib/excon/patcher.rb
ddtrace-1.1.0 lib/datadog/tracing/contrib/excon/patcher.rb
ddtrace-1.0.0 lib/datadog/tracing/contrib/excon/patcher.rb
ddtrace-1.0.0.beta2 lib/datadog/tracing/contrib/excon/patcher.rb