Expose Native.EnableScopePersistence (Android) and Native.EnableCrashHandler (iOS)

Aperta
#5,767 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature Platform: Android Platform: iOS State: Needs Discussion

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.

Lingua principale
C#
Stelle
775
Fork
262
Merge medio
1g 16h
PR unite (30g)
118

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-dotnet

Tutte le issue di getsentry/sentry-dotnet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.