lib/new_relic/agent/instrumentation/mongo.rb in newrelic_rpm-6.15.0 vs lib/new_relic/agent/instrumentation/mongo.rb in newrelic_rpm-7.0.0
- old
+ new
@@ -32,10 +32,17 @@
Mongo::Monitoring::COMMAND,
NewRelic::Agent::Instrumentation::MongodbCommandSubscriber.new
)
end
+ # TODO: Remove in 8.0.0 release
def install_mongo_instrumentation
+ ::NewRelic::Agent::Deprecator.deprecate "install_mongo_instrumentation", "install_mongo_command_subscriber", "8.0.0"
+ ::NewRelic::Agent.logger.warn("Installing deprecated Mongo instrumentation. " \
+ "This instrumentation will be removed in a future release. " \
+ "Update Mongo version to >= 2.1.0 for updated instrumentation"
+ )
+
require 'new_relic/agent/datastores/mongo/metric_translator'
require 'new_relic/agent/datastores/mongo/statement_formatter'
hook_instrument_methods
instrument_save