ref(anr): Align App Hang options with other gaming SDKs#753
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
bitsandfoxes
left a comment
There was a problem hiding this comment.
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?
|
@bitsandfoxes I think Other options use |
8dce517 to
7df1919
Compare
| 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; |
There was a problem hiding this comment.
The shutdownTimeInterval is in [s]? Huh..
There was a problem hiding this comment.
yep, cocoa and python use seconds
| /// ANR (Application Not Responding) detection instead. | ||
| /// </remarks> | ||
| public bool AppHangTracking { get; set; } = false; | ||
| public bool EnableAppHangTracking { get; set; } = false; |
There was a problem hiding this comment.
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."> |
There was a problem hiding this comment.
We'll want to flip this eventually. But maybe not right now? But with the release of app hang tracking via the native SDK.
There was a problem hiding this comment.
That's what I figured.

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(EnableAppHangTrackingin the C# layer), and the timeout is now expressed in milliseconds asapp_hang_timeout_msto match the units used elsewhere. The formerapp_hang_trackingandapp_hang_timeout_secoptions 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.