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