Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
The Mongo instrumentation no longer requires Mongo::Logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
thejonanshow committed May 14, 2014
1 parent 24e97d8 commit 0edcb00
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions lib/new_relic/agent/instrumentation/mongo.rb
Expand Up @@ -6,15 +6,7 @@
named :mongo

depends_on do
if defined?(::Mongo) && defined?(::Mongo::Logging)
true
else
if defined?(::Mongo)
NewRelic::Agent.logger.info 'Mongo instrumentation requires Mongo::Logging'
end

false
end
defined?(::Mongo)
end

depends_on do
Expand All @@ -31,12 +23,12 @@ def install_mongo_instrumentation
require 'new_relic/agent/datastores/mongo/metric_generator'
require 'new_relic/agent/datastores/mongo/statement_formatter'

instrument_via_mongo_logging
hook_instrument_methods
instrument_save
instrument_ensure_index
end

def instrument_via_mongo_logging
def hook_instrument_methods
hook_instrument_method(::Mongo::Collection)
hook_instrument_method(::Mongo::Connection)
hook_instrument_method(::Mongo::Cursor)
Expand Down

0 comments on commit 0edcb00

Please sign in to comment.