lib/scout_rails/store.rb in scout_rails-1.0.5 vs lib/scout_rails/store.rb in scout_rails-1.0.6
- old
+ new
@@ -61,11 +61,11 @@
end
meta = ScoutRails::MetricMeta.new(item.metric_name, :desc => options[:desc])
meta.scope = nil if stack_empty
# add backtrace for slow calls ... how is exclusive time handled?
- if duration > 0.5 and !stack_empty
- meta.extra = {:backtrace => caller.find_all { |c| c =~ /\/app\//}}
+ if duration > ScoutRails::TransactionSample::BACKTRACE_THRESHOLD and !stack_empty
+ meta.extra = {:backtrace => ScoutRails::TransactionSample.backtrace_parser(caller)}
end
stat = transaction_hash[meta] || ScoutRails::MetricStats.new(!stack_empty)
stat.update!(duration,duration-item.children_time)
transaction_hash[meta] = stat
\ No newline at end of file