Class: NewRelic::NoticedError
Overview
This class encapsulates an error that was noticed by RPM in a managed app.
Instance Attribute Summary collapse
-
#exception_class ⇒ Object
Returns the value of attribute exception_class.
-
#message ⇒ Object
Returns the value of attribute message.
-
#params ⇒ Object
Returns the value of attribute params.
-
#path ⇒ Object
Returns the value of attribute path.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(path, data, exception, timestamp = Time.now) ⇒ NoticedError
constructor
A new instance of NoticedError.
Constructor Details
#initialize(path, data, exception, timestamp = Time.now) ⇒ NoticedError
Returns a new instance of NoticedError.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/new_relic/noticed_error.rb', line 5 def initialize(path, data, exception, = Time.now) self.path = path self.params = data self.exception_class = exception ? exception.class.name : '<no exception>' if exception.respond_to?('original_exception') self. = exception.original_exception..to_s else self. = (exception || '<no message>').to_s end # clamp long messages to 4k so that we don't send a lot of # overhead across the wire self. = self.[0..4095] if self..length > 4096 self. = end |
Instance Attribute Details
#exception_class ⇒ Object
Returns the value of attribute exception_class.
3 4 5 |
# File 'lib/new_relic/noticed_error.rb', line 3 def exception_class @exception_class end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/new_relic/noticed_error.rb', line 3 def @message end |
#params ⇒ Object
Returns the value of attribute params.
3 4 5 |
# File 'lib/new_relic/noticed_error.rb', line 3 def params @params end |
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/new_relic/noticed_error.rb', line 3 def path @path end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/new_relic/noticed_error.rb', line 3 def @timestamp end |