Module: Datadog::Contrib::MongoDB::Patcher
- Includes:
- Patcher
- Defined in:
- lib/ddtrace/contrib/mongodb/patcher.rb
Overview
Patcher enables patching of 'mongo' module.
Class Method Summary collapse
Methods included from Patcher
Class Method Details
.add_mongo_monitoring ⇒ Object
25 26 27 28 |
# File 'lib/ddtrace/contrib/mongodb/patcher.rb', line 25 def add_mongo_monitoring # Subscribe to all COMMAND queries with our subscriber class ::Mongo::Monitoring::Global.subscribe(::Mongo::Monitoring::COMMAND, MongoCommandSubscriber.new) end |
.patch ⇒ Object
19 20 21 22 23 |
# File 'lib/ddtrace/contrib/mongodb/patcher.rb', line 19 def patch ::Mongo::Address.include(Instrumentation::Address) ::Mongo::Client.include(Instrumentation::Client) add_mongo_monitoring end |
.target_version ⇒ Object
15 16 17 |
# File 'lib/ddtrace/contrib/mongodb/patcher.rb', line 15 def target_version Integration.version end |