sentry-unreal
sentry-unreal copied to clipboard
Several Stacktraces can ignored when an event was reported
We made our own delegate to report the Android platform's assertions,But the top couple of Stacktraces we don't want to report,or that's what happens:we want the "UEngine:PerformError" to be top so that the title is displayed correctly.
Otherwise all assertions are displayed “SentrySubsystemAndroid::OnCrashing” ,[Issue Grouping]--[FINGERPRINT RULES]--[stack.*] only get the top stack so i cannot make a correctly title
Or is there another way to solve this problem?
thanks~
@km-jiaxiu I don't think you can alter the stack trace of the event being captured by native SDK on Android. Can you elaborate on what that delegate you've mentioned above is responsible for and how exactly it works?
@km-jiaxiu I don't think you can alter the stack trace of the event being captured by native SDK on Android. Can you elaborate on what that delegate you've mentioned above is responsible for and how exactly it works?
SentrySubsystemAndroid.cpp :
- add the code: FCoreDelegates::OnHandleSystemError.AddRaw(this, &SentrySubsystemAndroid::OnCrashing); to the InitWithSettings Function
- Add a function to the SentrySubsystemAndroid class:void SentrySubsystemAndroid::OnCrashing() { *(int32 *)3 = 123; }
- Set Configuration to Development, Package Android, Launch the App, Input command: debug check
We want to invoke the function in Unreal which in the class io.sentry.SentryEvent , so that we can remove stacktraces we do not need before send.
If you want to modify the event before it gets sent you can take a look at the beforeSend callback. We've got an example here https://github.com/getsentry/sentry-unreal/blob/6f2eaabf88e8594202af2547c04d81f1807a74e1/sample/Source/SentryPlayground/CppBeforeSendHandler.cpp#L8
@km-jiaxiu We've managed to resolve this issue in #537. The fix should be available with the next plugin release or you can try to download the corresponding package from our GitHub CI here.