RUM-12420 Add KSCrash report diagnostic #2562
Draft
+360
−0
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.
What and why?
This PR adds
DatadogDiagnosticFilterfor theKSCrashintegration, which generates human-readable diagnostic messages for crash reports. The filter analyzes crash data to determine the crash type (uncaught exceptions or signal-based crashes) and produces descriptive messages that explain the cause in plain language. This mirrors the diagnostic generation already present inDDCrashReportExporterfor thePLCrashReporterintegration, and is equivalent toKSCrash'sKSCrashReportFilterDoctor, ensuring consistent crash descriptions across both crash reporting backends.How?
The filter processes crash reports by analyzing the error data within each report. For uncaught
NSExceptioncrashes, it extracts the exception name and reason to generate messages like "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'unrecognized selector'."For signal-based crashes, it maps Unix signal names (
SIGSEGV,SIGABRT, etc.) to human-readable descriptions using a predefined dictionary, generating messages like "Application crash:SIGSEGV(Segmentation fault)". The filter injects these diagnostic messages into both the main crash report and any recrash reports present, with each report receiving a diagnosis based on its own error data.Review checklist
make api-surface)