Skip to content

ref(anr): Align App Hang options with other gaming SDKs#753

Merged
limbonaut merged 6 commits into
mainfrom
ref/app-hang-renames
Jun 16, 2026
Merged

ref(anr): Align App Hang options with other gaming SDKs#753
limbonaut merged 6 commits into
mainfrom
ref/app-hang-renames

Conversation

@limbonaut

@limbonaut limbonaut commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Aligns the app hang options with the other gaming SDKs, continuing the cross-SDK effort to standardize how detection of a frozen main thread is configured. The master toggle is renamed to enable_app_hang_tracking (EnableAppHangTracking in the C# layer), and the timeout is now expressed in milliseconds as app_hang_timeout_ms to match the units used elsewhere. The former app_hang_tracking and app_hang_timeout_sec options remain as deprecated aliases that forward to the new ones, and a Project Settings migration rewrites existing persisted values (converting the timeout from seconds to milliseconds) so projects upgrade without manual changes.

Comment thread src/sentry/settings_migrations.cpp

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8dce517. Configure here.

Comment thread src/sentry/settings_migrations.cpp
@limbonaut limbonaut changed the title WIP: ref(anr): Align App Hang options with other gaming SDKs ref(anr): Align App Hang options with other gaming SDKs Jun 9, 2026

@bitsandfoxes bitsandfoxes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I made the mistake in the Unity SDK with enable app hang tracking vs app hang tracking enabled. Looks to me Godot uses the latter as well? I.e. logger_enabled?

@limbonaut

Copy link
Copy Markdown
Collaborator Author

@bitsandfoxes I think logger_enabled is the only example of that naming we have, originally it was to group several related options under the common logger_ prefix namespace. I'm thinking on refactoring these Godot logger options: rename and move them under options.engine_logger.* or options.godot_logger.* hub.

Other options use enable_x Sentry convention.

Base automatically changed from ref/separate-anr-options to main June 15, 2026 10:25
options.enableAppHangTracking = SENTRY_OPTIONS()->is_app_hang_tracking_enabled();
options.appHangTimeoutInterval = SENTRY_OPTIONS()->get_app_hang_timeout_sec();
options.appHangTimeoutInterval = SENTRY_OPTIONS()->get_app_hang_timeout_ms() / 1000.0;
options.shutdownTimeInterval = SENTRY_OPTIONS()->get_shutdown_timeout_ms() / 1000.0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The shutdownTimeInterval is in [s]? Huh..

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yep, cocoa and python use seconds

@bitsandfoxes bitsandfoxes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks!

/// ANR (Application Not Responding) detection instead.
/// </remarks>
public bool AppHangTracking { get; set; } = false;
public bool EnableAppHangTracking { get; set; } = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We'll want to flip this eventually.

<member name="app_hang_timeout_sec" type="float" setter="deprecated_set_app_hang_timeout_sec" getter="deprecated_get_app_hang_timeout_sec" default="5.0" deprecated="Use [member app_hang_timeout_ms] instead.">
Specifies the timeout duration in seconds after which the application is considered to have hanged.
</member>
<member name="app_hang_tracking" type="bool" setter="deprecated_set_app_hang_tracking" getter="deprecated_get_app_hang_tracking" default="false" deprecated="Use [member enable_app_hang_tracking] instead.">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We'll want to flip this eventually. But maybe not right now? But with the release of app hang tracking via the native SDK.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's what I figured.

@limbonaut limbonaut merged commit 104f8f0 into main Jun 16, 2026
145 of 149 checks passed
@limbonaut limbonaut deleted the ref/app-hang-renames branch June 16, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants