# File lib/new_relic/agent/instrumentation/data_mapper.rb, line 99 def self.add_tracer(clazz, method_name, operation_only = false) clazz.class_eval do if method_defined?(method_name) || private_method_defined?(method_name) define_method("#{method_name}_with_newrelic", NewRelic::Agent::DataMapperTracing.method_body(clazz, method_name, operation_only)) alias_method "#{method_name}_without_newrelic", method_name alias_method method_name, "#{method_name}_with_newrelic" end end end