Sha256: 6a0040d7d26aed42a356f8b68fbc93260d86db5287df105aa0c6e39e782794d7

Contents?: true

Size: 918 Bytes

Versions: 5

Compression:

Stored size: 918 Bytes

Contents

# typed: false
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

5 entries across 5 versions & 1 rubygems

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