Sha256: 6fe426a87270a8e0161db8d721ee8eea7a8f3702f06f6ba1e412882684d32abd

Contents?: true

Size: 417 Bytes

Versions: 7

Compression:

Stored size: 417 Bytes

Contents

# Mongoid versions that use Moped should instrument Moped.
if defined?(::Mongoid) and !defined?(::Moped)
  ProfileIt::Agent.instance.logger.debug "Instrumenting Mongoid"
  Mongoid::Collection.class_eval do
    include ProfileIt::Tracer
    (Mongoid::Collections::Operations::ALL - [:<<, :[]]).each do |method|
      profile_it_instrument_method method, :metric_name => "MongoDB/\#{@klass}/#{method}"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
profile_it-0.2.9 lib/profile_it/instruments/mongoid_instruments.rb
profile_it-0.2.8.1 lib/profile_it/instruments/mongoid_instruments.rb
profile_it-0.2.8 lib/profile_it/instruments/mongoid_instruments.rb
profile_it-0.2.7 lib/profile_it/instruments/mongoid_instruments.rb
profile_it-0.2.6 lib/profile_it/instruments/mongoid_instruments.rb
profile_it-0.2.5 lib/profile_it/instruments/mongoid_instruments.rb
profile_it-0.2.4 lib/profile_it/instruments/mongoid_instruments.rb