69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/l2metable.rb', line 69
def log_exception(subcomponent, e, = {})
exception_suffix = "exception"
= {:at => dotted(log_component(subcomponent), exception_suffix)}.merge()
if e.nil? || !e.is_a?(Exception)
measure(exception_suffix, 1, )
return
end
exception_id = e.object_id.abs
trace = e.backtrace.reduce do |memo, line|
memo + line.gsub(/[`'"]/, "") + "\n"
end
measure(exception_suffix, 1, {
:exception_id => exception_id,
:class => e.class,
:message => e.message,
:trace => trace
}.merge())
end
|