Sha256: e60c3e2d5a5d8e92dd888299e67cdc39492e1af5673a4bc11d128610d9decc24

Contents?: true

Size: 808 Bytes

Versions: 35

Compression:

Stored size: 808 Bytes

Contents

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

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

        register_as :mongo, auto_patch: true

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

        def self.present?
          super && defined?(::Mongo::Monitoring::Global)
        end

        def self.compatible?
          super && version >= Gem::Version.new('2.1.0')
        end

        def default_configuration
          Configuration::Settings.new
        end

        def patcher
          Patcher
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
ddtrace-0.22.0 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.21.2 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.21.1 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.21.0 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.20.0 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.19.1 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.19.0 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.18.3 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.18.2 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.18.1 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.18.0 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.17.3 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.17.2 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.17.1 lib/ddtrace/contrib/mongodb/integration.rb
ddtrace-0.17.0 lib/ddtrace/contrib/mongodb/integration.rb