7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/scout_apm/auto_instrument/instruction_sequence.rb', line 7
def load_iseq(path)
if Rails.controller_path?(path) & !Rails.ignore?(path)
begin
new_code = Rails.rewrite(path)
return self.compile(new_code, path, path)
rescue
warn "Failed to apply auto-instrumentation to #{path}: #{$!}" if ENV['SCOUT_LOG_LEVEL'].to_s.downcase == "debug"
end
elsif Rails.ignore?(path)
warn "AutoInstruments are ignored for path=#{path}." if ENV['SCOUT_LOG_LEVEL'].to_s.downcase == "debug"
end
return self.compile_file(path)
end
|