Class: Sentry::ErrorEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/sentry/error_event.rb

Overview

ErrorEvent represents error or normal message events.

Constant Summary

Constants inherited from Event

Sentry::Event::MAX_MESSAGE_SIZE_IN_BYTES, Sentry::Event::SERIALIZEABLE_ATTRIBUTES, Sentry::Event::SKIP_INSPECTION_ATTRIBUTES, Sentry::Event::TYPE, Sentry::Event::WRITER_ATTRIBUTES

Instance Attribute Summary collapse

Attributes inherited from Event

#dynamic_sampling_context, #request

Instance Method Summary collapse

Methods inherited from Event

#configuration, #initialize, #level=, #rack_env=, #timestamp=, #to_json_compatible

Constructor Details

This class inherits a constructor from Sentry::Event

Instance Attribute Details

#exceptionExceptionInterface (readonly)

Returns:



7
8
9
# File 'lib/sentry/error_event.rb', line 7

def exception
  @exception
end

#threadsThreadsInterface (readonly)

Returns:



10
11
12
# File 'lib/sentry/error_event.rb', line 10

def threads
  @threads
end

Instance Method Details

#to_hashHash

Returns:

  • (Hash)


13
14
15
16
17
18
# File 'lib/sentry/error_event.rb', line 13

def to_hash
  data = super
  data[:threads] = threads.to_hash if threads
  data[:exception] = exception.to_hash if exception
  data
end