Add in-process hang tracking with Native backend on Windows, Linux, and Mac - #1427
Merged
Conversation
Contributor
|
Native backend on Windows and MacNative backend on Windows, Linux, and Mac
# Conflicts: # CHANGELOG.md # modules/sentry-native
Native backend on Windows, Linux, and MacNative backend on Windows, Linux, and Mac
# Conflicts: # CHANGELOG.md # modules/sentry-native
tustanivsky
marked this pull request as ready for review
June 24, 2026 12:59
Contributor
|
I wonder whether we should keep this as experimental and opt-in for a bit? The new bits and pieces in sentry-native suspend the main thread, so some real-life validation before enabling this by default would be nice. That's also the way I intend to do it for Unity: getsentry/sentry-unity#2709 |
Collaborator
Author
@bitsandfoxes Yes, it makes sense to add this as an opt-in feature. By default, the SDK continues to use Unreal's hang watcher ( |
mujacica
approved these changes
Jun 24, 2026
2 tasks
tustanivsky
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Jun 25, 2026
…18534) This PR adds info about opt-in native app-hang detection (sentry-native's watchdog) via the new `UseNativeHangTracking` setting, alongside the existing engine watcher, on Windows, Linux, and macOS. Related items: - getsentry/sentry-unreal#1427 --------- Co-authored-by: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com>
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 opt-in native app-hang detection powered by sentry-native alongside the existing engine
FThreadHeartBeathang watcher.Key changes
UseNativeHangTrackingsetting under Hang Tracking (requiresEnableHangTracking). When enabled, hangs are detected by sentry-native's in-process app-hang watchdog instead of Unreal Engine'sFThreadHeartBeatwatcher.sentry_options_set_enable_app_hang_trackingandsentry_options_set_app_hang_timeoutbeforesentry_init, reusing the existingHangTimeoutDurationvalue.FCoreDelegates::OnEndFrame. The first tick marks the game thread as monitored, and subsequent frames refresh the heartbeat viasentry_app_hang_heartbeat.FSentryHangWatcherremains the default implementation and is disabled only whenUseNativeHangTrackingis enabled, preventing duplicate hang reports.Testing
Engine/Native), gated per platform/backend (macOS runs the Native mechanism under the Native backend).Known limitations
Documentation
Relate items
Windowssentry-native#1781Linuxsentry-native#1801macOSsentry-native#1780