Sha256: 2c79ff975cf8e21e6dfbc2e4dabac0ba18ea039fbe478661f4486c45081c5fa3

Contents?: true

Size: 733 Bytes

Versions: 8

Compression:

Stored size: 733 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

module NewRelic
  module Agent
    module Datastores
      module Mongo

        def self.is_supported_version?
          # No version constant in < 2.0 versions of Mongo :(
          defined?(::Mongo) &&
            defined?(::Mongo::MongoClient) &&
            !is_version2
        end

        # At present we explicitly don't support version 2.x of the driver yet
        def self.is_version2
          defined?(::Mongo::VERSION) &&
            NewRelic::VersionNumber.new(::Mongo::VERSION) > NewRelic::VersionNumber.new("2.0.0")
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
newrelic_rpm-3.7.3.204 lib/new_relic/agent/datastores/mongo.rb
newrelic_rpm-3.7.3.199 lib/new_relic/agent/datastores/mongo.rb
newrelic_rpm-3.7.2.195 lib/new_relic/agent/datastores/mongo.rb
newrelic_rpm-3.7.2.192 lib/new_relic/agent/datastores/mongo.rb
newrelic_rpm-3.7.2.190.beta lib/new_relic/agent/datastores/mongo.rb
newrelic_rpm-3.7.1.188 lib/new_relic/agent/datastores/mongo.rb
newrelic_rpm-3.7.1.182 lib/new_relic/agent/datastores/mongo.rb
newrelic_rpm-3.7.1.180 lib/new_relic/agent/datastores/mongo.rb