Map iOS Native BeforeSend & OnCrashedLastEvent to SentryOptions.Native#3958
Map iOS Native BeforeSend & OnCrashedLastEvent to SentryOptions.Native#3958
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.
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.
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