Skip to content

wip(native): capture WER custom metadata#1760

Open
jpnurmi wants to merge 8 commits into
masterfrom
jpnurmi/feat/native/wer-metadata
Open

wip(native): capture WER custom metadata#1760
jpnurmi wants to merge 8 commits into
masterfrom
jpnurmi/feat/native/wer-metadata

Conversation

@jpnurmi
Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi commented May 27, 2026

App:

WerRegisterCustomMetadata(L"foo", L"ooo");
WerRegisterCustomMetadata(L"bar", L"aaa");
WerRegisterCustomMetadata(L"baz", L"zzz");

Context:

{
  "contexts": {
    "wer": {
      "type": "wer",
      "report_id": "...",
      "metadata": {
        "foo": "ooo",
        "bar": "aaa",
        "baz": "zzz"
      }
    }
  }
}

Sentry:
image

Comment thread src/backends/native/sentry_crash_daemon.c
Comment thread src/backends/native/sentry_wer_report.c
@jpnurmi jpnurmi force-pushed the jpnurmi/feat/native/wer-metadata branch from c9a7b1a to c218239 Compare May 27, 2026 07:27
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 27, 2026

TGDX-58

@jpnurmi jpnurmi changed the title feat(native): capture WER custom metadata wip(native): capture WER custom metadata May 27, 2026
jpnurmi added 6 commits May 27, 2026 16:31
Pre-generate the native crash event ID and register it as WER custom
metadata so the crash daemon can identify the matching
WERInternalMetadata.xml.

Store the WER report ID provided by sentry-wer.dll in the shared crash
context and add a wer context with the report ID and app-provided WER
custom metadata.
@jpnurmi jpnurmi force-pushed the jpnurmi/feat/native/wer-metadata branch from c218239 to b503ec0 Compare May 27, 2026 14:36
Comment thread src/backends/native/sentry_crash_daemon.c
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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 d5dc747. Configure here.

Sleep(SENTRY_CRASH_HANDLER_POLL_INTERVAL_MS);
}
TerminateProcess(exception_info->hProcess,
exception_info->exceptionRecord.ExceptionCode);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WER module no longer waits for daemon minidump capture

Medium Severity

The WER out-of-process module previously waited for the crash daemon to finish processing (including minidump capture via ReadProcessMemory/MiniDumpWriteDump) and then explicitly called TerminateProcess. That wait loop and TerminateProcess are now removed, so process_wer_exception signals the daemon and returns immediately. Meanwhile, the crash handler in the app process returns EXCEPTION_CONTINUE_SEARCH unconditionally (when WER is enabled), relying entirely on the WER module to notify the daemon. Without the wait, WER can proceed through its callback sequence, finish its report, and terminate the crashed process before the daemon completes minidump capture — resulting in an incomplete or failed minidump.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d5dc747. Configure here.

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