Class: APMInsight::Errors::ExceptionRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/agent/metrics/exception_record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception, time = Time.now) ⇒ ExceptionRecord

Returns a new instance of ExceptionRecord.



7
8
9
10
11
# File 'lib/agent/metrics/exception_record.rb', line 7

def initialize(exception, time = Time.now)
  @time = time.to_f * 1000;
  @message = exception.message
  @exception = exception
end

Instance Attribute Details

#exceptionObject (readonly)

Returns the value of attribute exception.



5
6
7
# File 'lib/agent/metrics/exception_record.rb', line 5

def exception
  @exception
end

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/agent/metrics/exception_record.rb', line 5

def message
  @message
end

#timeObject (readonly)

Returns the value of attribute time.



5
6
7
# File 'lib/agent/metrics/exception_record.rb', line 5

def time
  @time
end

Instance Method Details

#==(obj) ⇒ Object



13
14
15
# File 'lib/agent/metrics/exception_record.rb', line 13

def ==(obj)
  return obj != nil && @exception == obj.exception
end

#hashObject



17
18
19
# File 'lib/agent/metrics/exception_record.rb', line 17

def hash
  return @exception.hash
end