Repository navigation
feat: [SDK-5059] tag crash records with whether attribution succeeded - #34
Merged
Merged
Conversation
Merged
7 of 14 tasks
Platforms gate crash capture on proving the crash came from SDK code. On iOS that proof is unavailable whenever the SDK shares the host's executable, so the gate turns real crashes into silence that looks identical to no crashes at all. Carry the platform's verdict on CrashData and emit it as the typed OTLP bool ossdk.crash.attributed, so a platform can capture what it cannot attribute and leave the filtering to the backend. Defaults to true, keeping Android's current contract unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
abdulraqeeb33
force-pushed
the
ar/sdk-5059
branch
from
November 17, 2026 16:58
afd7b79 to
6331914
Compare
Contributor
|
Potential issues:
|
fadi-george
approved these changes
Nov 17, 2026
KDoc is exported to the generated Obj-C header, so the inline comment was invisible to Swift. Move it to @Property. Also pin the flag on saveNonFatal, which shares the same emit path. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Both nits in 2c051a0.
On the Android default, that answers the question I left in the description, and the answer is that |
Contributor
Author
|
2 and 3 are in
|
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds
attributedtoCrashDataand emits it as the typed OTLP boolossdk.crash.attributed, alongside the existingossdk.crash.fatal.Motivation
Both platforms gate crash capture on proving the crash came from SDK code. On iOS that proof is not always available. Attribution relies on the stack frame's Mach-O image naming us, which only holds while the SDK ships as separate frameworks. Once it is linked into the host executable every frame reports the same image, and the symbol fallback cannot stand in: release builds strip the local symbols that name our ObjC methods and Swift functions, so
dladdrreturns no name. Verified by stripping a probe binary (+[OSProbe probe]resolves, then returns nil afterstrip -x) and by confirming an app target in Release resolves toSTRIP_INSTALLED_PRODUCT = YESwithSTRIP_STYLE = all.When the gate cannot work, dropping turns real crashes into silence that looks identical to no crashes at all, so the failure mode hides itself and makes crash metrics read as healthy.
Carrying the platform's verdict on the record lets a platform capture what it cannot attribute and leaves the filtering to the backend, so attribution stops being a single point of failure.
Scope
Public surface: one parameter on
CrashData, defaulting totrue. Android source compatibility is unchanged, and Android keeps emittingattributed = trueuntil it opts in.Please confirm the default is honest for Android. It is correct if the Android handler captures only crashes it attributed to the SDK; if it captures unfiltered,
truewould misreport and Android should pass the real verdict.The iOS consumer is OneSignal-iOS-SDK#1811. This needs to merge and be tagged before that one can land.
Testing
:kmp:iosSimulatorArm64TestandspotlessCheckpass. New testsaveCrashTagsAttributionFromCrashDataasserts both polarities reach the encoded record. Reverting the production change to a hardcodedtrueturns it red.Checklist