Expose Native.EnableScopePersistence (Android) and Native.EnableCrashHandler (iOS)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Read src/Sentry/Platforms/Android/SentrySdk.cs and src/Sentry/Platforms/Cocoa/SentrySdk.cs, then locate the matching BindableNativeSentryOptions and Cocoa BindableSentryOptions entries. Forward both native settings during SDK initialization and document them on the native options pages; done when each option reaches its platform SDK and the documented behavior includes Cocoa watchdog tracking.
Written by the indexing model from the issue text.
Description
Users who want to limit what the native SDKs collect or write to disk on mobile have no way to reach two relevant native options from .NET. Both bindings already exist.
Android: EnableScopePersistence
sentry-java's PersistingScopeObserver writes the current scope (user, tags, extras, contexts, request, breadcrumbs, …) to <cache>/android/.scope-cache/ on every change. It's on by default (SentryOptions.enableScopePersistence) and only used to backfill ANR (ApplicationExitInfo) and tombstone events. Expose it as options.Native.EnableScopePersistence and forward it alongside the other options in InitSentryAndroidSdk.
iOS / Mac Catalyst: EnableCrashHandler
The Cocoa SDK's enableCrashHandler (default true, bound at ApiDefinition.cs as EnableCrashHandler) isn't forwarded. That leaves no supported way to turn off native crash reporting on iOS while keeping managed error capture. (Android can already do this with Native.EnableNdk, Native.EnableUncaughtExceptionHandler and Native.AnrEnabled.) Expose it as options.Native.EnableCrashHandler and forward it in InitSentryCocoaSdk. Note that disabling it also disables Cocoa's watchdog termination tracking.
Both need matching BindableNativeSentryOptions / Cocoa BindableSentryOptions entries, and docs on the native options pages.
Raised in #5733.
- Dominant language
- C#
- Stars
- 775
- Forks
- 262
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 118
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-dotnet
-
chore: remove stale IL3050/IL3053 workaround from the iOS samplePossibly taken A pull request linked to this issue is open or already merged. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6071 · 1 comment ·
Maintainers usually reply within 1 day
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"Possibly taken @pcbeingused33 claimed this today. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6039 · 3 comments ·
Maintainers usually reply within 1 day
-
.NET Platform: Android Task
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
getsentry/sentry-dotnet#6020 · 3 comments ·
Maintainers usually reply within 1 day
-
Move the Blazor WebAssembly sample off the deprecated DevServerPossibly taken A pull request linked to this issue is open or already merged. Open.NET Framework: Blazor
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
getsentry/sentry-dotnet#5906 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Docs MSBuild Needs Docs Update
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-dotnet#5691 · 1 comment ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-dotnet
Similar issues
-
In-car displays show 0 km/h and P while the AV drivesPossibly taken @bazilinskyy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bazilinskyy/coupled-sim#366 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BaryoDev/umbraco-pwa#196 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/fluentui-blazor#5688 ·
Maintainers usually reply within 1 day
-
bug flaky lsp-transport small
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day