This repository was archived by the owner on May 14, 2025. It is now read-only.
[PM-4914] Sentry MAUI for crash reporting #2878
Closed
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.
Adds
Sentry.Maui, initializes with the app. And configures msbuild to upload symbols automatically.Before merging we'd need to change csproj props to take a different Sentry account (not my test one).
Added some sample buttons to make different crashes. We can remove them before merging. Or hide them somehow to be able to test things out easily.
Version is a beta right now, but the team is working on a final release soon (weeks away).
Android
A managed C# exception, with source context:
Note that Sentry does give you line numbers for Android crashes in Release builds published on the stores.
This is a crash done from
C(P/Invoked):Notice there's actually no line number. That's because the native library that crashed didn't get uploaded, this was fixed today and will be out on the next release of the SDK:
Some of the Android context:

iOS
Example iOS Simulator managed crash:
I'm getting an issue with the simulator though we need to look at.
Debug files
Sentry supports Portable PDB (.NET) but also DWARF, ELF, ProGuard, etc. It gets uploaded with the MSBuild. You'll see it in the logs.
This log was on a second build without code changes but shows on the terminal during
dotnet buildAnd you can see it in Sentry too:
Other features
We can get performance monitoring going but there's that creates transactions automatically yet so would need a bit of code. It's in the plan though.
It does pass a
trace-idto the backend so you can link errors that happen on your app with anything on the backend. Super useful for debugging stuff.Before you submit
dotnet format --verify-no-changes) (required)