Skip to content

feat(windows): report host OS context under Wine and Proton - #2241

Open
tustanivsky wants to merge 3 commits into
masterfrom
feat/wine-host-os-context
Open

tustanivsky wants to merge 3 commits into
masterfrom
feat/wine-host-os-context

Conversation

@tustanivsky

@tustanivsky tustanivsky commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Under Wine and Proton, the OS context currently reports the Windows version that Wine emulates (e.g. Windows 10.0.19045). This reports the host OS instead, in the same shape as the native Linux OS context, next to the wine context added in #1995.

  • Read the host name and kernel release via ntdll's wine_get_host_version export, and split them into name, version and build like on Linux
  • Read the host os-release through the Z: drive for the distribution_* fields, preferring /run/host so the host is reported instead of the Steam Runtime or Flatpak container
  • Share the uname release split and the os-release parser between the Linux and Windows code
  • Fall back to the Windows OS context when the export is not available (native Windows, or Wine with hidden exports)

Behavior change

Under Wine/Proton, os.name changes from Windows to Linux (or Darwin on macOS hosts), and the os.name/os.version attributes of logs and metrics change with it. This matches what sentry-godot and sentry-unreal already report via their own OS context overrides, which this PR is meant to replace.

The emulated Windows version is no longer reported. If it is useful, it could be added to the wine context (e.g. windows_version).

Related

Under Wine, build the OS context from the host via wine_get_host_version and the host os-release read through the Z: drive, in the same shape as the native Linux OS context. Prefer /run/host to report the host instead of the Steam Runtime or Flatpak container.
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against d84d6e9

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.90977% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.49%. Comparing base (8d90c56) to head (d84d6e9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2241      +/-   ##
==========================================
- Coverage   75.63%   75.49%   -0.15%     
==========================================
  Files         103      103              
  Lines       28263    28329      +66     
  Branches     5180     5194      +14     
==========================================
+ Hits        21378    21387       +9     
- Misses       5540     5593      +53     
- Partials     1345     1349       +4     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tustanivsky
tustanivsky marked this pull request as ready for review October 23, 2026 15:48

This branch has not been deployed

No deployments
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.

1 participant