lib/one_apm/agent/datastore/mongo.rb in oneapm_rpm-1.2.9 vs lib/one_apm/agent/datastore/mongo.rb in oneapm_rpm-1.3.0.rc1
- old
+ new
@@ -9,9 +9,13 @@
defined?(::Mongo) &&
defined?(::Mongo::MongoClient) &&
!is_version2?
end
+ def self.is_support_version2?
+ defined?(::Mongo::Monitoring) && is_version2?
+ end
+
# At present we explicitly don't support version 2.x of the driver yet
def self.is_version2?
defined?(::Mongo::VERSION) &&
OneApm::VersionNumber.new(::Mongo::VERSION) > OneApm::VersionNumber.new("2.0.0")
end