Skip to content

Integrate Sentry crash analytics#62

Open
Jim8y wants to merge 3 commits into
neoorder:masterfrom
Jim8y:codex/sentry-crash-analytics
Open

Integrate Sentry crash analytics#62
Jim8y wants to merge 3 commits into
neoorder:masterfrom
Jim8y:codex/sentry-crash-analytics

Conversation

@Jim8y

@Jim8y Jim8y commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

What

Integrates Sentry (Sentry.Maui 6.6.0) as the third-party crash analytics service. Sentry automatically captures unhandled managed exceptions and native crashes across Android/iOS/maccatalyst — no manual exception handlers needed.

Wired as builder.UseSentry(ConfigureSentry) (early in the chain, right after UseMauiApp).

Configuration

  • DSN is a single constant: SharedOptions.SentryDsn (currently empty). Set it to your Sentry DSN to enable — an empty value leaves the SDK disabled (no crash, no data sent), so this is safe to merge before the DSN is provisioned.
  • Privacy-conscious defaults for a wallet: SendDefaultPii = false, AttachScreenshot = false (avoid capturing on-screen balances/addresses), TracesSampleRate = 0 (crash reporting only).

Verified / notes

Add Sentry.Maui, which automatically captures unhandled managed exceptions and
native crashes across platforms. The DSN is a configurable constant
(SharedOptions.SentryDsn); an empty value leaves the SDK disabled until the team
provides their Sentry endpoint. Privacy-conscious defaults for a wallet:
SendDefaultPii=false, AttachScreenshot=false, no performance tracing.

Builds for net10.0-android (0 errors).
Copilot AI review requested due to automatic review settings June 21, 2026 11:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates Sentry crash analytics into the .NET MAUI app so unhandled managed exceptions and native crashes can be captured on supported platforms.

Changes:

  • Add Sentry.Maui NuGet dependency.
  • Introduce SharedOptions.SentryDsn as the central DSN configuration value (empty by default).
  • Wire Sentry into MauiProgram.CreateMauiApp() via builder.UseSentry(...) and configure privacy-oriented options.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
OneGateApp/Services/SharedOptions.cs Adds a SentryDsn constant used to enable/disable Sentry via configuration.
OneGateApp/OneGateApp.csproj Adds the Sentry.Maui package reference.
OneGateApp/MauiProgram.cs Registers Sentry during app startup and sets Sentry options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread OneGateApp/Services/SharedOptions.cs Outdated
Comment thread OneGateApp/MauiProgram.cs
@Jim8y

Jim8y commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Latest review follow-up: addressed both Copilot comments in 9bb830e.

Changes:

  • SharedOptions.SentryDsn is now documented as a Sentry DSN, not a crash analytics endpoint.
  • UseSentry(ConfigureSentry) is called only when SharedOptions.SentryDsn is non-empty, so the empty default does not register Sentry.

Validation:

  • git diff --check passed.
  • Conflict-marker scan passed.
  • iOS simulator build/install/app launch verified.
  • Android emulator build/install/app launch verified with empty crash log.

Screenshots:

Screenshots are GitHub release assets only and are not committed to the repository. Ready for re-review.

…analytics

# Conflicts:
#	OneGateApp/Services/SharedOptions.cs
@Jim8y

Jim8y commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Base refresh validation update:

  • Merged latest origin/master (3b20d5f) into codex/sentry-crash-analytics; pushed merge commit 8e6619c.
  • Conflict resolution was limited to OneGateApp/Services/SharedOptions.cs: kept the base ContactEmail value and this PR’s empty-by-default SentryDsn switch. No startup behavior changed unless a DSN is configured.
  • GitHub reports this PR as mergeable; unresolved review threads: 0.
  • Android emulator validation (emulator-5554): dotnet build OneGateApp/OneGateApp.csproj -f net10.0-android -c Debug -p:EmbedAssembliesIntoApk=true, installed the signed APK, launched org.neoorder.onegate/crc64e93af8ff8666345c.MainActivity, confirmed a running pid, and captured a screenshot.
  • iOS simulator validation (iPhone 17 Pro, iOS 26.5): dotnet build OneGateApp/OneGateApp.csproj -f net10.0-ios -c Debug -p:RuntimeIdentifier=iossimulator-arm64, installed and launched the app, and captured a screenshot.
  • Existing warning observed: SQLitePCLRaw.lib.e_sqlite3 NU1903, unchanged/pre-existing.

Screenshots are stored as GitHub release assets only, not committed to the repo:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants