diff --git a/src/Sentry/Platforms/Android/BindableNativeSentryOptions.cs b/src/Sentry/Platforms/Android/BindableNativeSentryOptions.cs index e8ce8b4444..1ceb8a6ec0 100644 --- a/src/Sentry/Platforms/Android/BindableNativeSentryOptions.cs +++ b/src/Sentry/Platforms/Android/BindableNativeSentryOptions.cs @@ -34,6 +34,8 @@ public class NativeOptions public bool? PrintUncaughtStackTrace { get; set; } public double? ProfilesSampleRate { get; set; } public TimeSpan? ReadTimeout { get; set; } + public bool? TombstoneEnabled { get; set; } + public bool? ReportHistoricalTombstones { get; set; } public bool? EnableTracing { get; set; } public bool? EnableBeforeSend { get; set; } @@ -77,6 +79,8 @@ public void ApplyTo(SentryOptions.NativeOptions options) options.PrintUncaughtStackTrace = PrintUncaughtStackTrace ?? options.PrintUncaughtStackTrace; options.ProfilesSampleRate = ProfilesSampleRate ?? options.ProfilesSampleRate; options.ReadTimeout = ReadTimeout ?? options.ReadTimeout; + options.TombstoneEnabled = TombstoneEnabled ?? options.TombstoneEnabled; + options.ReportHistoricalTombstones = ReportHistoricalTombstones ?? options.ReportHistoricalTombstones; options.EnableTracing = EnableTracing ?? options.EnableTracing; options.EnableBeforeSend = EnableBeforeSend ?? options.EnableBeforeSend; diff --git a/src/Sentry/Platforms/Android/NativeOptions.cs b/src/Sentry/Platforms/Android/NativeOptions.cs index eacad17cb9..5aa7f94bf5 100644 --- a/src/Sentry/Platforms/Android/NativeOptions.cs +++ b/src/Sentry/Platforms/Android/NativeOptions.cs @@ -207,6 +207,18 @@ internal NativeOptions(SentryOptions options) /// public TimeSpan ReadTimeout { get; set; } = TimeSpan.FromSeconds(5); + /// + /// Gets or sets a value that indicates if native crash reporting via tombstones is enabled. + /// The default value is false (disabled). + /// + public bool TombstoneEnabled { get; set; } = false; + + /// + /// Gets or sets a value that indicates if historical tombstones should be reported. + /// The default value is false (disabled). + /// + public bool ReportHistoricalTombstones { get; set; } = false; + // ---------- Other ---------- internal List? InAppExcludes { get; private set; } diff --git a/src/Sentry/Platforms/Android/SentrySdk.cs b/src/Sentry/Platforms/Android/SentrySdk.cs index d47fe75664..16f21d61b1 100644 --- a/src/Sentry/Platforms/Android/SentrySdk.cs +++ b/src/Sentry/Platforms/Android/SentrySdk.cs @@ -156,6 +156,8 @@ private static void InitSentryAndroidSdk(SentryOptions options) o.ProfilesSampleRate = (JavaDouble?)options.Native.ProfilesSampleRate; o.PrintUncaughtStackTrace = options.Native.PrintUncaughtStackTrace; o.ReadTimeoutMillis = (int)options.Native.ReadTimeout.TotalMilliseconds; + o.TombstoneEnabled = options.Native.TombstoneEnabled; + o.ReportHistoricalTombstones = options.Native.ReportHistoricalTombstones; // In-App Excludes and Includes to be passed to the Android SDK options.Native.InAppExcludes?.ForEach(o.AddInAppExclude);