Sha256: e96b350446596eb10b003edfb6412dc517f1697de2d67d42841497e2d541124f
Contents?: true
Size: 823 Bytes
Versions: 5
Compression:
Stored size: 823 Bytes
Contents
# typed: false require 'ddtrace/contrib/patcher' require 'ddtrace/contrib/mongodb/ext' require 'ddtrace/contrib/mongodb/instrumentation' module Datadog module Contrib module MongoDB # Patcher enables patching of 'mongo' module. module Patcher include Contrib::Patcher module_function def target_version Integration.version end def patch ::Mongo::Address.include(Instrumentation::Address) ::Mongo::Client.include(Instrumentation::Client) add_mongo_monitoring end def add_mongo_monitoring # Subscribe to all COMMAND queries with our subscriber class ::Mongo::Monitoring::Global.subscribe(::Mongo::Monitoring::COMMAND, MongoCommandSubscriber.new) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems