Produce Swift diagnostics for all types of crashes. #257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
This PR adds crash parsing abilities that allows us to dig deep into a crash info deeply nested map that comes from the OS (and is pre-digested by KSCrash), to find extra information with details that can be used to produce diagnostics.
The Swift Rollbar Demo has also been greatly expanded with multiple types of crashes.
~8700 lines correspond to a crash report used in unit tests. Another +200 to Xcode related project files such as schemes, hopefully knowing this makes the PR less scary.
RollbarCrashDiagnosticFilter
class is our hook intoKSCrash
report post-crash processing that happens the next time the app is opened after a crash occurred, and before sending the report to Rollbar.The entry point is the
filterReports
function. We receive an array of reports, each report is a hashmap (a Dictionary in Apple parlance), that we validate for correctness and then diagnose by producing the diagnostics we want and injecting them back into the hashmap which we tend send back to the KSCrash processing pipeline, where we eventually receive it and send it to Rollbar.Diagnostic/RollbarCrashDiagnosticFilter.swift
would be a good place to start a review.Type of change
Related issues
Checklists
Development
Code review