-
-
Notifications
You must be signed in to change notification settings - Fork 226
Map iOS Native BeforeSend & OnCrashedLastEvent to SentryOptions.Native #3958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
….com/getsentry/sentry-dotnet into 2102-ios_beforesend_oncrashedlastrun
|
@jamescrosswell @bruno-garcia Native exceptions obviously teardown the MAUI apps. I can't unit test this properly due to needing to shutdown the app. Thoughts? Any internal mechanism I can call in native to have it "pretend" an issue occurred previously and force run BeforeSend/CrashedLastRun |
|
Over at https://github.com/getsentry/sentry-unity/ we're covering this via smoketests which to me seems more reliable to guarantee native-crash capture.
|
…nCrashedLastRun only available to IOS/MacCatalyst for now
I think the |
Can't really fake/mock the native layer though. This is smoke tested in the iOS sample app. |
…ue to SentryEnvelopeItem being deserialized instead of SentryEvent
…stead of trying to remap the entire object
| if (levelString == null) | ||
| return null; | ||
|
|
||
| // Native SentryLevel.None does not exist in dotnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know what the behaviour of SentryLevel.None is? Does it mean nothing gets logged? Is that was setting the level = null does?
| "warning" => SentryLevel.Warning, | ||
| "fatal" => SentryLevel.Fatal, | ||
| "error" => SentryLevel.Error, | ||
| _ => null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it this is intentional (we don't want to throw an exception but we can't conveniently log the irregularity anywhere)?
Resolves #2102