Sha256: 8290c3760162bb57a7f4bb3e235f9df3d768d84e06feb551c64d1112a77df75c

Contents?: true

Size: 819 Bytes

Versions: 25

Compression:

Stored size: 819 Bytes

Contents

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

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

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

        register_as :dalli, auto_patch: true

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

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

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

        def default_configuration
          Configuration::Settings.new
        end

        def patcher
          Patcher
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

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