Add out-of-process hang tracking with Native backend on Windows, Linux, and Mac#1427
Draft
tustanivsky wants to merge 10 commits into
Draft
Add out-of-process hang tracking with Native backend on Windows, Linux, and Mac#1427tustanivsky wants to merge 10 commits into
Native backend on Windows, Linux, and Mac#1427tustanivsky wants to merge 10 commits into
Conversation
Contributor
|
Native backend on Windows and MacNative backend on Windows, Linux, and Mac
# Conflicts: # CHANGELOG.md # modules/sentry-native
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for sentry-native's out-of-process app-hang detection and wires it into the plugin's existing hang-tracking configuration, so that the
Nativebackend gets daemon-side hang reporting instead of the engine-side watcher.Key changes
UseNativeBackend) on a supported platform,EnableHangTrackingnow drives sentry-native's app-hang detector instead of the engineFThreadHeartBeatwatcher:sentry_options_set_app_hang_enabledandsentry_options_set_app_hang_timeout_msare configured beforesentry_init(using the existingHangTimeoutDurationvalue as the timeout).FCoreDelegates::OnEndFrame. BecauseOnEndFrameis broadcast on the game thread, the first tick latches it as the monitored thread (sentry_app_hang_set_target_thread), and each subsequent frame refreshes the heartbeat (sentry_app_hang_heartbeat). The out-of-process crash daemon monitors heartbeat staleness and emits anApplicationNotRespondingevent while the game continues running.FSentryHangWatcher) is automatically disabled when the native detector is active to avoid double-reporting. It remains the fallback path for the Crashpad backend and on platforms where native app-hang detection is not supported.Known limitations
Relate items
Windowssentry-native#1781Linuxsentry-native#1801macOSsentry-native#1780