Sha256: ddd6158acec5c1b0a863378b1df3c02e8a6707c03e4a31d0541d2cab2c020f2c

Contents?: true

Size: 903 Bytes

Versions: 25

Compression:

Stored size: 903 Bytes

Contents

require 'ddtrace/contrib/integration'
require 'ddtrace/contrib/redis/configuration/settings'
require 'ddtrace/contrib/redis/patcher'

module Datadog
  module Contrib
    module Redis
      # Description of Redis integration
      class Integration
        include Contrib::Integration

        MINIMUM_VERSION = Gem::Version.new('3.2')

        register_as :redis, auto_patch: true

        def self.version
          Gem.loaded_specs['redis'] && Gem.loaded_specs['redis'].version
        end

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

        def self.compatible?
          super && version >= MINIMUM_VERSION
        end

        def default_configuration
          Configuration::Settings.new
        end

        def patcher
          Patcher
        end

        def resolver
          @resolver ||= Configuration::Resolver.new
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
ddtrace-0.35.0 lib/ddtrace/contrib/redis/integration.rb
ddtrace-0.34.2 lib/ddtrace/contrib/redis/integration.rb
ddtrace-0.34.1 lib/ddtrace/contrib/redis/integration.rb
ddtrace-0.34.0 lib/ddtrace/contrib/redis/integration.rb
ddtrace-0.33.1 lib/ddtrace/contrib/redis/integration.rb