Class: SentryBreakpad::BreakpadParser
- Inherits:
-
Object
- Object
- SentryBreakpad::BreakpadParser
- Defined in:
- lib/sentry_breakpad/breakpad_parser.rb
Overview
parses a breakpad report
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(breakpad_report_content) ⇒ BreakpadParser
constructor
A new instance of BreakpadParser.
- #raven_event(extra_info = {}, include_whole_report = true) ⇒ Object
- #raven_event_hash(include_whole_report = true) ⇒ Object
Constructor Details
#initialize(breakpad_report_content) ⇒ BreakpadParser
Returns a new instance of BreakpadParser.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sentry_breakpad/breakpad_parser.rb', line 10 def initialize(breakpad_report_content) @breakpad_report_content = breakpad_report_content @parsed = false = nil = {} @crashed_thread_stacktrace = [] @culprit = nil @modules = {} @extra = {} end |
Class Method Details
.from_file(file_path) ⇒ Object
6 7 8 |
# File 'lib/sentry_breakpad/breakpad_parser.rb', line 6 def self.from_file(file_path) new(File.open(file_path).read) end |
Instance Method Details
#raven_event(extra_info = {}, include_whole_report = true) ⇒ Object
22 23 24 25 |
# File 'lib/sentry_breakpad/breakpad_parser.rb', line 22 def raven_event(extra_info = {}, include_whole_report = true) hash = deep_merge(raven_event_hash(include_whole_report), extra_info) Raven::Event.new(hash) end |
#raven_event_hash(include_whole_report = true) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/sentry_breakpad/breakpad_parser.rb', line 27 def raven_event_hash(include_whole_report = true) parse extra = if include_whole_report @extra.merge({'raw_breakpad_report' => @breakpad_report_content}) else @extra end { 'message' => , 'tags' => , 'culprit' => @culprit, 'modules' => @modules, 'extra' => extra, 'level' => 'fatal', 'logger' => 'breakpad', 'platform' => 'c', 'interfaces' => { 'stacktrace' => { 'frames' => @crashed_thread_stacktrace } } } end |