File tree Expand file tree Collapse file tree
src/Sentry/Platforms/Cocoa Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public class NativeOptions
2121 public bool ? EnableMemoryIntrospection { get ; set ; }
2222 public bool ? EnableNetworkBreadcrumbs { get ; set ; }
2323 public bool ? EnableNetworkTracking { get ; set ; }
24+ public bool ? EnableWatchdogTerminationTracking { get ; set ; }
2425 public bool ? EnableSwizzling { get ; set ; }
2526 public bool ? EnableUIViewControllerTracing { get ; set ; }
2627 public bool ? EnableUserInteractionTracing { get ; set ; }
@@ -41,6 +42,9 @@ public void ApplyTo(SentryOptions.NativeOptions options)
4142 options . EnableMemoryIntrospection = EnableMemoryIntrospection ?? options . EnableMemoryIntrospection ;
4243 options . EnableNetworkBreadcrumbs = EnableNetworkBreadcrumbs ?? options . EnableNetworkBreadcrumbs ;
4344 options . EnableNetworkTracking = EnableNetworkTracking ?? options . EnableNetworkTracking ;
45+ #pragma warning disable CS0618 // Type or member is obsolete
46+ options . EnableWatchdogTerminationTracking = EnableWatchdogTerminationTracking ?? options . EnableWatchdogTerminationTracking ;
47+ #pragma warning restore CS0618 // Type or member is obsolete
4448 options . EnableSwizzling = EnableSwizzling ?? options . EnableSwizzling ;
4549 options . EnableUIViewControllerTracing = EnableUIViewControllerTracing ?? options . EnableUIViewControllerTracing ;
4650 options . EnableUserInteractionTracing = EnableUserInteractionTracing ?? options . EnableUserInteractionTracing ;
Original file line number Diff line number Diff line change @@ -140,6 +140,18 @@ internal NativeOptions(SentryOptions options)
140140 /// </remarks>
141141 public bool EnableNetworkTracking { get ; set ; } = true ;
142142
143+ /// <summary>
144+ /// Whether to enable watchdog termination tracking or not. NOT advised.
145+ /// The default value is <c>false</c> (disabled).
146+ /// </summary>
147+ /// <remarks>
148+ /// This feature is prone to false positives on .NET since it relies on heuristics that don't work in this environment.
149+ /// </remarks>
150+ /// <seealso href="https://github.com/getsentry/sentry-dotnet/issues/3860" />
151+ /// <seealso href="https://docs.sentry.io/platforms/apple/configuration/watchdog-terminations/" />
152+ [ Obsolete ( "See: https://github.com/getsentry/sentry-dotnet/issues/3860" ) ]
153+ public bool EnableWatchdogTerminationTracking { get ; set ; } = false ;
154+
143155 /// <summary>
144156 /// Whether the SDK should use swizzling or not.
145157 /// The default value is <c>true</c> (enabled).
Original file line number Diff line number Diff line change @@ -143,8 +143,9 @@ private static void InitSentryCocoaSdk(SentryOptions options)
143143 nativeOptions . EnableMemoryIntrospection = options . Native . EnableMemoryIntrospection ;
144144 nativeOptions . EnableNetworkBreadcrumbs = options . Native . EnableNetworkBreadcrumbs ;
145145 nativeOptions . EnableNetworkTracking = options . Native . EnableNetworkTracking ;
146- // Prone to false positives on .NET, see https://github.com/getsentry/sentry-dotnet/issues/3860
147- nativeOptions . EnableWatchdogTerminationTracking = false ;
146+ #pragma warning disable CS0618 // Type or member is obsolete
147+ nativeOptions . EnableWatchdogTerminationTracking = options . Native . EnableWatchdogTerminationTracking ;
148+ #pragma warning restore CS0618 // Type or member is obsolete
148149 nativeOptions . EnableSwizzling = options . Native . EnableSwizzling ;
149150 nativeOptions . EnableUIViewControllerTracing = options . Native . EnableUIViewControllerTracing ;
150151 nativeOptions . EnableUserInteractionTracing = options . Native . EnableUserInteractionTracing ;
You can’t perform that action at this time.
0 commit comments