Sha256: ccfa90585bb9d7d5435ba4981adf4ca85b9e1d3ee6b9ac3460235c5a6ead2952

Contents?: true

Size: 1.01 KB

Versions: 5

Compression:

Stored size: 1.01 KB

Contents

# typed: false
require 'ddtrace/version'

require 'ddtrace/contrib/integration'
require 'ddtrace/contrib/http/configuration/settings'
require 'ddtrace/contrib/configuration/resolvers/pattern_resolver'
require 'ddtrace/contrib/http/patcher'
require 'ddtrace/contrib/http/circuit_breaker'

module Datadog
  module Contrib
    # HTTP integration
    module HTTP
      extend CircuitBreaker

      # Description of HTTP integration
      class Integration
        include Contrib::Integration

        MINIMUM_VERSION = Datadog::VERSION::MINIMUM_RUBY_VERSION

        register_as :http, auto_patch: true

        def self.version
          Gem::Version.new(RUBY_VERSION)
        end

        def self.loaded?
          !defined?(::Net::HTTP).nil?
        end

        def default_configuration
          Configuration::Settings.new
        end

        def patcher
          Patcher
        end

        def resolver
          @resolver ||= Contrib::Configuration::Resolvers::PatternResolver.new
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ddtrace-0.54.2 lib/ddtrace/contrib/http/integration.rb
ddtrace-0.54.1 lib/ddtrace/contrib/http/integration.rb
ddtrace-0.54.0 lib/ddtrace/contrib/http/integration.rb
ddtrace-0.53.0 lib/ddtrace/contrib/http/integration.rb
ddtrace-0.52.0 lib/ddtrace/contrib/http/integration.rb