Skip to content

feat!: remove obsolete iOS options EnableAppHangTrackingV2 and AddInAppExclude - #5654

Merged
jamescrosswell merged 3 commits into
version7from
feat/cocoa-v9-options
Oct 1, 2026
Merged

jamescrosswell merged 3 commits into
version7from
feat/cocoa-v9-options

Conversation

@jamescrosswell

@jamescrosswell jamescrosswell commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Removes the two Cocoa native options that were marked [Obsolete] when sentry-cocoa v9 landed in #4830:

  • SentryOptions.Native.EnableAppHangTrackingV2 (and its bindable counterpart). App Hangs V2 is what EnableAppHangTracking turns on in sentry-cocoa v9, so users should set that instead.
  • SentryOptions.Native.AddInAppExclude(string). It has had no effect since sentry-cocoa v9 removed inAppExcludes. AddInAppInclude and the Android Native.AddInAppExclude are unchanged.

Changelog Entry

  • Removed SentryOptions.Native.EnableAppHangTrackingV2 on iOS and Mac Catalyst (use EnableAppHangTracking instead)
  • Removed SentryOptions.Native.AddInAppExclude(string) on iOS, which had no effect

EnableAppHangTracking stays false by default

The issue asked us to reconsider this default. I've left it disabled:

  • It was switched off deliberately in App Hang Tracking for iOS is now disabled by default #4320 because of false positives under the .NET runtime ((MAUI) False App Hang on iOS #4150). I couldn't find anything showing V2 fixes that for .NET.
  • sentry-cocoa has since deprecated App Hang tracking in favour of MetricKit and removes the option in v10 (see CHANGELOG_V10.md and decision 38 in develop-docs/DECISIONS.md in the submodule). Turning it on by default now would opt every .NET iOS app into a feature that's on its way out.

Closes #4877

🤖 Generated with Claude Code

jamescrosswell and others added 2 commits October 1, 2026 11:29
…nAppExclude

Both were marked obsolete when sentry-cocoa v9 made App Hangs V2 the
default and dropped inAppExcludes. EnableAppHangTracking stays disabled
by default: sentry-cocoa has deprecated App Hang tracking in favour of
MetricKit and removes it in v10.

Closes #4877

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Watchdog termination tracking stays disabled on the native SDK, since
sentry-cocoa enables it by default and it produces false positives on
.NET (#3860).

Closes #4643

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamescrosswell jamescrosswell changed the title feat!: remove obsolete iOS options Native.EnableAppHangTrackingV2 and Native.AddInAppExclude feat!: remove obsolete iOS options EnableAppHangTrackingV2, EnableWatchdogTerminationTracking and AddInAppExclude Sep 30, 2026
…Tracking"

This reverts commit e2efaea. The option still exists in sentry-cocoa,
so #4643 is not planned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamescrosswell jamescrosswell changed the title feat!: remove obsolete iOS options EnableAppHangTrackingV2, EnableWatchdogTerminationTracking and AddInAppExclude feat!: remove obsolete iOS options Native.EnableAppHangTrackingV2 and Native.AddInAppExclude Sep 30, 2026
@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (version7@2f21e3f). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             version7    #5654   +/-   ##
===========================================
  Coverage            ?   75.04%           
===========================================
  Files               ?      516           
  Lines               ?    18931           
  Branches            ?     3677           
===========================================
  Hits                ?    14207           
  Misses              ?     3859           
  Partials            ?      865           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell jamescrosswell changed the title feat!: remove obsolete iOS options Native.EnableAppHangTrackingV2 and Native.AddInAppExclude feat!: remove obsolete iOS options EnableAppHangTrackingV2 and AddInAppExclude Sep 30, 2026
@jamescrosswell
jamescrosswell marked this pull request as ready for review October 1, 2026 04:25
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 1, 2026
Comment thread src/Sentry/Platforms/Cocoa/BindableSentryOptions.cs

@ric-oliv ric-oliv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice... The code looks fine for me.
Interesting that the java and cocoa packages are diverging on this, though.

Maybe worth also mentioning in the PR description

Removed SentryOptions.Native.AddInAppExclude(string) on iOS, which had no effect.

since the Android version is still there.

@jamescrosswell
jamescrosswell merged commit 61e86fc into version7 Oct 1, 2026
46 checks passed
@jamescrosswell
jamescrosswell deleted the feat/cocoa-v9-options branch October 1, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove obsolete Cocoa options EnableAppHangTrackingV2 and AddInAppExclude(string)

2 participants