Skip to content

feat: add on_crashed_last_run callback - #1985

Open
jpnurmi wants to merge 17 commits into
masterfrom
jpnurmi/feat/on-crashed-last-run
Open

feat: add on_crashed_last_run callback#1985
jpnurmi wants to merge 17 commits into
masterfrom
jpnurmi/feat/on-crashed-last-run

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Invoke the callback during startup for envelopes associated with crashes in previous runs across the in-process, Breakpad, Crashpad, and native backends.

Retain the native daemon's dedicated crash envelope in the application run as callback-only state, separate from transport queue dumps, so successfully delivered crashes are not sent again.

Close: #885

Have the native crash daemon adopt the application's existing .run
instead of creating a second unrelated .run, and store daemon logs,
minidumps, crash envelopes, and signal-handler scratch files within
that .run.

Protect daemon-owned work with a dedicated `.run.daemon.lock` so
old-run processing waits for completion. Keep retry cache and external
storage database-global, and leave crashed runs for normal next-launch
cleanup.
@github-actions

github-actions Bot commented Aug 12, 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 8252293

Comment thread src/backends/sentry_backend_native.c
Comment thread src/sentry_database.c
Comment thread src/sentry_database.c Outdated
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.71264% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.43%. Comparing base (85b229c) to head (8252293).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1985      +/-   ##
==========================================
+ Coverage   74.41%   74.43%   +0.02%     
==========================================
  Files         104      104              
  Lines       25913    26077     +164     
  Branches     4691     4732      +41     
==========================================
+ Hits        19282    19411     +129     
- Misses       5299     5322      +23     
- Partials     1332     1344      +12     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi force-pushed the jpnurmi/feat/on-crashed-last-run branch from 386c7cb to e48d967 Compare August 12, 2026 19:59
Comment thread src/backends/sentry_backend_crashpad.cpp
@jpnurmi
jpnurmi force-pushed the jpnurmi/feat/on-crashed-last-run branch from 93dd083 to 4fabb41 Compare August 13, 2026 12:11
Comment thread src/sentry_database.c
Comment thread src/backends/sentry_backend_crashpad.cpp
Comment thread src/backends/sentry_backend_crashpad.cpp
Invoke the callback during startup for envelopes associated with crashes in
previous runs across the in-process, Breakpad, Crashpad, and native backends.

Retain the native daemon's dedicated crash envelope in the application run as
callback-only state, separate from transport queue dumps, so successfully
delivered crashes are not sent again.
@jpnurmi
jpnurmi force-pushed the jpnurmi/feat/on-crashed-last-run branch from 12f1eff to bf26eaf Compare August 14, 2026 08:34

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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

Comment thread src/backends/sentry_backend_crashpad.cpp
Comment thread src/backends/sentry_backend_crashpad.cpp
Base automatically changed from jpnurmi/ref/native-run to master August 18, 2026 10:43
…shed-last-run

# Conflicts:
#	CHANGELOG.md
#	src/backends/native/sentry_crash_daemon.c
#	src/sentry_database.c
#	src/sentry_database.h
#	tests/unit/test_native_backend.c
Comment thread src/backends/sentry_backend_breakpad.cpp
Comment thread src/sentry_database.c
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.

Provide user-feedback capability to the Native SDK

3 participants