Class: Atatus::Error Private

Inherits:
Object
  • Object
show all
Defined in:
lib/atatus/error.rb,
lib/atatus/error/log.rb,
lib/atatus/error/exception.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: Exception, Log

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(culprit: nil, context: nil) ⇒ Error

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Error.



28
29
30
31
32
33
# File 'lib/atatus/error.rb', line 28

def initialize(culprit: nil, context: nil)
  @id = SecureRandom.hex(16)
  @culprit = culprit
  @timestamp = Util.micros
  @context = context
end

Instance Attribute Details

#contextObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def context
  @context
end

#culpritObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def culprit
  @culprit
end

#exceptionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def exception
  @exception
end

#idObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def id
  @id
end

#logObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def log
  @log
end

#parent_idObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def parent_id
  @parent_id
end

#timestampObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



37
38
39
# File 'lib/atatus/error.rb', line 37

def timestamp
  @timestamp
end

#trace_idObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def trace_id
  @trace_id
end

#transactionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def transaction
  @transaction
end

#transaction_idObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def transaction_id
  @transaction_id
end

#transaction_nameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
# File 'lib/atatus/error.rb', line 35

def transaction_name
  @transaction_name
end

Instance Method Details

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



39
40
41
42
43
44
45
46
47
48
# File 'lib/atatus/error.rb', line 39

def inspect
  "<Atatus::Error id:#{id}" \
    " culprit:#{culprit}" \
    " timestamp:#{timestamp}" \
    " transaction_id:#{transaction_id}" \
    " transaction_name:#{transaction_name}" \
    " trace_id:#{trace_id}" \
    " exception:#{exception.inspect}" \
    '>'
end