Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

### Fixes

- .NET Mobile: Disable and made obsolete the iOS Watchdog termination feature which is based on heuristics that don't work in .NET ([#3867](https://github.com/getsentry/sentry-dotnet/pull/3867))


### Dependencies

- Bump Native SDK from v0.7.16 to v0.7.17 ([#3857](https://github.com/getsentry/sentry-dotnet/pull/3857))
Expand Down
2 changes: 2 additions & 0 deletions src/Sentry/Platforms/Cocoa/BindableSentryOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public void ApplyTo(SentryOptions.NativeOptions options)
options.EnableFileIOTracing = EnableFileIOTracing ?? options.EnableFileIOTracing;
options.EnableNetworkBreadcrumbs = EnableNetworkBreadcrumbs ?? options.EnableNetworkBreadcrumbs;
options.EnableNetworkTracking = EnableNetworkTracking ?? options.EnableNetworkTracking;
#pragma warning disable CS0618 // Type or member is obsolete
options.EnableWatchdogTerminationTracking = EnableWatchdogTerminationTracking ?? options.EnableWatchdogTerminationTracking;
#pragma warning restore CS0618 // Type or member is obsolete
options.EnableSwizzling = EnableSwizzling ?? options.EnableSwizzling;
options.EnableUIViewControllerTracing = EnableUIViewControllerTracing ?? options.EnableUIViewControllerTracing;
options.EnableUserInteractionTracing = EnableUserInteractionTracing ?? options.EnableUserInteractionTracing;
Expand Down
11 changes: 7 additions & 4 deletions src/Sentry/Platforms/Cocoa/SentryOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,16 @@ internal NativeOptions(SentryOptions options)
public bool EnableNetworkTracking { get; set; } = true;

/// <summary>
/// Whether to enable watchdog termination tracking or not.
/// The default value is <c>true</c> (enabled).
/// Whether to enable watchdog termination tracking or not. NOT advised.
/// The default value is <c>false</c> (disabled).
/// </summary>
/// <remarks>
/// https://docs.sentry.io/platforms/apple/configuration/watchdog-terminations/
/// This feature is prone to false positives on .NET since it relies on heuristics that don't work in this environment.
/// </remarks>
public bool EnableWatchdogTerminationTracking { get; set; } = true;
/// <seealso href="https://github.com/getsentry/sentry-dotnet/issues/3860" />
/// <seealso href="https://docs.sentry.io/platforms/apple/configuration/watchdog-terminations/" />
[Obsolete("See: https://github.com/getsentry/sentry-dotnet/issues/3860")]
public bool EnableWatchdogTerminationTracking { get; set; } = false;

/// <summary>
/// Whether the SDK should use swizzling or not.
Expand Down
2 changes: 2 additions & 0 deletions src/Sentry/Platforms/Cocoa/SentrySdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ private static void InitSentryCocoaSdk(SentryOptions options)
nativeOptions.EnableFileIOTracing = options.Native.EnableFileIOTracing;
nativeOptions.EnableNetworkBreadcrumbs = options.Native.EnableNetworkBreadcrumbs;
nativeOptions.EnableNetworkTracking = options.Native.EnableNetworkTracking;
#pragma warning disable CS0618 // Type or member is obsolete
nativeOptions.EnableWatchdogTerminationTracking = options.Native.EnableWatchdogTerminationTracking;
#pragma warning restore CS0618 // Type or member is obsolete
nativeOptions.EnableSwizzling = options.Native.EnableSwizzling;
nativeOptions.EnableUIViewControllerTracing = options.Native.EnableUIViewControllerTracing;
nativeOptions.EnableUserInteractionTracing = options.Native.EnableUserInteractionTracing;
Expand Down
Loading