feat(crashtracking): report unhandled exceptions#1596
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
9d890c4 to
b876b7b
Compare
9becc2b to
82a0aff
Compare
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: c2457b1 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksComparisonBenchmark execution time: 2026-02-20 19:09:52 Comparing candidate commit c2457b1 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
Group 18
Group 19
BaselineOmitted due to size. |
b876b7b to
f198560
Compare
82a0aff to
cb83452
Compare
f198560 to
285bf36
Compare
cc12c2c to
50c6547
Compare
285bf36 to
99181d9
Compare
50c6547 to
d4fe74f
Compare
d4fe74f to
cefddfb
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1596 +/- ##
========================================
Coverage 71.24% 71.25%
========================================
Files 423 423
Lines 62198 62439 +241
========================================
+ Hits 44315 44489 +174
- Misses 17883 17950 +67
🚀 New features to boost your workflow:
|
cefddfb to
aae6c75
Compare
aae6c75 to
0a838b8
Compare
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
0a838b8 to
aa18900
Compare
eb48c1a
into
main
# What does this PR do? Add FFI interface for reporting unhandled exception. Also adds tests for it. *The FFI examples test infra part is largely claude code driven* PR below on the stack: [feat(crashtracking): report unhandled exceptions](#1596) # Motivation What inspired you to submit this pull request? # Additional Notes Anything else we should know when reviewing? # How to test the change? Run ffi example tests Co-authored-by: gyuheon.oh <[email protected]>
# Release proposal for libdd-crashtracker and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-crashtracker **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-crashtracker-v2.0.0` ### Commits - chore(crashtracking): add tag for target triple (#1741) - refactor(libdd-crashtracker)!: avoid leaking Endpoint through the public API (#1705) - chore(cargo): bump to 29.0.0 (#1702) - fix(crashtracking): use libunwind to unwind frames (#1663) - chore(deps): bump blazesym to 0.2.3 and blazesym-c to 0.1.7 (#1654) - chore(ci): fix crashtracker receiver binary rpath setting (#1652) - chore(crashtracking): emit a best effort stacktrace for Mac (#1645) - chore(crashtracker): use default-features=false for aws-lc-sys (#1625) - feat(crashtracking): report unhandled exceptions (#1596) - refactor(ddcommon)!: remove direct dependency on hyper client everywhere in common (#1604) - feat(crashtracking): include `Kind` in crash ping and clarify requirements (#1595) - fix(crashtracking): add process_tags to application field (#1576) - ci: update nightly in CI to 2026-02-08 (#1539) - fix(telemetry)!: fix logs payload format [APMSP-2590] (#1498) - chore(crashtracking): bump os_info crate to 3.14 (#1507) - Don't bail (#1494) - feat(crashtracking)!: emit crashing thread name in crash report for linux crashes (#1485) - test(crashtracking): add minimal LD preload test for crashtracker collector (#1428) - chore: release libddcommon-v1.1.0 (#1456) - chore: prepare libdd-telemetry-v2.0.0 (#1457) - [crashtracker] Retrieve panic message when crashing (#1361) - fix(sidecar): AWS lambda also can return EACCESS for shm_open (#1446) - chore(crashtracking): add `is_crash_debug` tag to crashtracker receiver debug logs (#1445) - [crashtracker] Log errors in crashtracker receiver (#1395) - chore: add changelog for every published crate (#1396) - Fix CI (#1389) - [crashtracker] Set OS info in the crash info builder when receiving report (#1388) - crashtracker: support cxx bindings for crashinfo (#1379) [APMSP-2590]: https://datadoghq.atlassian.net/browse/APMSP-2590?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
# Release proposal for libdd-crashtracker and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-crashtracker **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-crashtracker-v2.0.0` ### Commits - chore(crashtracking): add tag for target triple (#1741) - refactor(libdd-crashtracker)!: avoid leaking Endpoint through the public API (#1705) - chore(cargo): bump to 29.0.0 (#1702) - fix(crashtracking): use libunwind to unwind frames (#1663) - chore(deps): bump blazesym to 0.2.3 and blazesym-c to 0.1.7 (#1654) - chore(ci): fix crashtracker receiver binary rpath setting (#1652) - chore(crashtracking): emit a best effort stacktrace for Mac (#1645) - chore(crashtracker): use default-features=false for aws-lc-sys (#1625) - feat(crashtracking): report unhandled exceptions (#1596) - refactor(ddcommon)!: remove direct dependency on hyper client everywhere in common (#1604) - feat(crashtracking): include `Kind` in crash ping and clarify requirements (#1595) - fix(crashtracking): add process_tags to application field (#1576) - ci: update nightly in CI to 2026-02-08 (#1539) - fix(telemetry)!: fix logs payload format [APMSP-2590] (#1498) - chore(crashtracking): bump os_info crate to 3.14 (#1507) - Don't bail (#1494) - feat(crashtracking)!: emit crashing thread name in crash report for linux crashes (#1485) - test(crashtracking): add minimal LD preload test for crashtracker collector (#1428) - chore: release libddcommon-v1.1.0 (#1456) - chore: prepare libdd-telemetry-v2.0.0 (#1457) - [crashtracker] Retrieve panic message when crashing (#1361) - fix(sidecar): AWS lambda also can return EACCESS for shm_open (#1446) - chore(crashtracking): add `is_crash_debug` tag to crashtracker receiver debug logs (#1445) - [crashtracker] Log errors in crashtracker receiver (#1395) - chore: add changelog for every published crate (#1396) - Fix CI (#1389) - [crashtracker] Set OS info in the crash info builder when receiving report (#1388) - crashtracker: support cxx bindings for crashinfo (#1379) [APMSP-2590]: https://datadoghq.atlassian.net/browse/APMSP-2590?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
# Release proposal for libdd-crashtracker and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-crashtracker **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-crashtracker-v2.0.0` ### Commits - chore(ci): give libdd-libunwind-sys its own version (#1743) - chore(crashtracking): add tag for target triple (#1741) - refactor(libdd-crashtracker)!: avoid leaking Endpoint through the public API (#1705) - chore(cargo): bump to 29.0.0 (#1702) - fix(crashtracking): use libunwind to unwind frames (#1663) - chore(deps): bump blazesym to 0.2.3 and blazesym-c to 0.1.7 (#1654) - chore(ci): fix crashtracker receiver binary rpath setting (#1652) - chore(crashtracking): emit a best effort stacktrace for Mac (#1645) - chore(crashtracker): use default-features=false for aws-lc-sys (#1625) - feat(crashtracking): report unhandled exceptions (#1596) - refactor(ddcommon)!: remove direct dependency on hyper client everywhere in common (#1604) - feat(crashtracking): include `Kind` in crash ping and clarify requirements (#1595) - fix(crashtracking): add process_tags to application field (#1576) - ci: update nightly in CI to 2026-02-08 (#1539) - fix(telemetry)!: fix logs payload format [APMSP-2590] (#1498) - chore(crashtracking): bump os_info crate to 3.14 (#1507) - Don't bail (#1494) - feat(crashtracking)!: emit crashing thread name in crash report for linux crashes (#1485) - test(crashtracking): add minimal LD preload test for crashtracker collector (#1428) - chore: release libddcommon-v1.1.0 (#1456) - chore: prepare libdd-telemetry-v2.0.0 (#1457) - [crashtracker] Retrieve panic message when crashing (#1361) - fix(sidecar): AWS lambda also can return EACCESS for shm_open (#1446) - chore(crashtracking): add `is_crash_debug` tag to crashtracker receiver debug logs (#1445) - [crashtracker] Log errors in crashtracker receiver (#1395) - chore: add changelog for every published crate (#1396) - Fix CI (#1389) - [crashtracker] Set OS info in the crash info builder when receiving report (#1388) - crashtracker: support cxx bindings for crashinfo (#1379) [APMSP-2590]: https://datadoghq.atlassian.net/browse/APMSP-2590?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
# Release proposal for libdd-crashtracker and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-crashtracker **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-crashtracker-v2.0.0` ### Commits - chore(crashtracking): rename target triple to runtime platform (#1747) - chore(ci): give libdd-libunwind-sys its own version (#1743) - chore(crashtracking): add tag for target triple (#1741) - refactor(libdd-crashtracker)!: avoid leaking Endpoint through the public API (#1705) - chore(cargo): bump to 29.0.0 (#1702) - fix(crashtracking): use libunwind to unwind frames (#1663) - chore(deps): bump blazesym to 0.2.3 and blazesym-c to 0.1.7 (#1654) - chore(ci): fix crashtracker receiver binary rpath setting (#1652) - chore(crashtracking): emit a best effort stacktrace for Mac (#1645) - chore(crashtracker): use default-features=false for aws-lc-sys (#1625) - feat(crashtracking): report unhandled exceptions (#1596) - refactor(ddcommon)!: remove direct dependency on hyper client everywhere in common (#1604) - feat(crashtracking): include `Kind` in crash ping and clarify requirements (#1595) - fix(crashtracking): add process_tags to application field (#1576) - ci: update nightly in CI to 2026-02-08 (#1539) - fix(telemetry)!: fix logs payload format [APMSP-2590] (#1498) - chore(crashtracking): bump os_info crate to 3.14 (#1507) - Don't bail (#1494) - feat(crashtracking)!: emit crashing thread name in crash report for linux crashes (#1485) - test(crashtracking): add minimal LD preload test for crashtracker collector (#1428) - chore: release libddcommon-v1.1.0 (#1456) - chore: prepare libdd-telemetry-v2.0.0 (#1457) - [crashtracker] Retrieve panic message when crashing (#1361) - fix(sidecar): AWS lambda also can return EACCESS for shm_open (#1446) - chore(crashtracking): add `is_crash_debug` tag to crashtracker receiver debug logs (#1445) - [crashtracker] Log errors in crashtracker receiver (#1395) - chore: add changelog for every published crate (#1396) - Fix CI (#1389) - [crashtracker] Set OS info in the crash info builder when receiving report (#1388) - crashtracker: support cxx bindings for crashinfo (#1379) Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
# Release proposal for libdd-crashtracker and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-crashtracker **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-crashtracker-v2.0.0` ### Commits - chore(crashtracking): rename target triple to runtime platform (#1747) - chore(ci): give libdd-libunwind-sys its own version (#1743) - chore(crashtracking): add tag for target triple (#1741) - refactor(libdd-crashtracker)!: avoid leaking Endpoint through the public API (#1705) - chore(cargo): bump to 29.0.0 (#1702) - fix(crashtracking): use libunwind to unwind frames (#1663) - chore(deps): bump blazesym to 0.2.3 and blazesym-c to 0.1.7 (#1654) - chore(ci): fix crashtracker receiver binary rpath setting (#1652) - chore(crashtracking): emit a best effort stacktrace for Mac (#1645) - chore(crashtracker): use default-features=false for aws-lc-sys (#1625) - feat(crashtracking): report unhandled exceptions (#1596) - refactor(ddcommon)!: remove direct dependency on hyper client everywhere in common (#1604) - feat(crashtracking): include `Kind` in crash ping and clarify requirements (#1595) - fix(crashtracking): add process_tags to application field (#1576) - ci: update nightly in CI to 2026-02-08 (#1539) - fix(telemetry)!: fix logs payload format [APMSP-2590] (#1498) - chore(crashtracking): bump os_info crate to 3.14 (#1507) - Don't bail (#1494) - feat(crashtracking)!: emit crashing thread name in crash report for linux crashes (#1485) - test(crashtracking): add minimal LD preload test for crashtracker collector (#1428) - chore: release libddcommon-v1.1.0 (#1456) - chore: prepare libdd-telemetry-v2.0.0 (#1457) - [crashtracker] Retrieve panic message when crashing (#1361) - fix(sidecar): AWS lambda also can return EACCESS for shm_open (#1446) - chore(crashtracking): add `is_crash_debug` tag to crashtracker receiver debug logs (#1445) - [crashtracker] Log errors in crashtracker receiver (#1395) - chore: add changelog for every published crate (#1396) - Fix CI (#1389) - [crashtracker] Set OS info in the crash info builder when receiving report (#1388) - crashtracker: support cxx bindings for crashinfo (#1379) Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
# Release proposal for libdd-crashtracker and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-common **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-common-v3.0.0` ### Commits - refactor(trace-utils)!: change header name type to accept dynamic values (#1722) ## libdd-crashtracker **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-crashtracker-v2.0.0` ### Commits - chore(crashtracking): rename target triple to runtime platform (#1747) - chore(ci): give libdd-libunwind-sys its own version (#1743) - chore(crashtracking): add tag for target triple (#1741) - refactor(libdd-crashtracker)!: avoid leaking Endpoint through the public API (#1705) - chore(cargo): bump to 29.0.0 (#1702) - fix(crashtracking): use libunwind to unwind frames (#1663) - chore(deps): bump blazesym to 0.2.3 and blazesym-c to 0.1.7 (#1654) - chore(ci): fix crashtracker receiver binary rpath setting (#1652) - chore(crashtracking): emit a best effort stacktrace for Mac (#1645) - chore(crashtracker): use default-features=false for aws-lc-sys (#1625) - feat(crashtracking): report unhandled exceptions (#1596) - refactor(ddcommon)!: remove direct dependency on hyper client everywhere in common (#1604) - feat(crashtracking): include `Kind` in crash ping and clarify requirements (#1595) - fix(crashtracking): add process_tags to application field (#1576) - ci: update nightly in CI to 2026-02-08 (#1539) - fix(telemetry)!: fix logs payload format [APMSP-2590] (#1498) - chore(crashtracking): bump os_info crate to 3.14 (#1507) - Don't bail (#1494) - feat(crashtracking)!: emit crashing thread name in crash report for linux crashes (#1485) - test(crashtracking): add minimal LD preload test for crashtracker collector (#1428) - chore: release libddcommon-v1.1.0 (#1456) - chore: prepare libdd-telemetry-v2.0.0 (#1457) - [crashtracker] Retrieve panic message when crashing (#1361) - fix(sidecar): AWS lambda also can return EACCESS for shm_open (#1446) - chore(crashtracking): add `is_crash_debug` tag to crashtracker receiver debug logs (#1445) - [crashtracker] Log errors in crashtracker receiver (#1395) - chore: add changelog for every published crate (#1396) - Fix CI (#1389) - [crashtracker] Set OS info in the crash info builder when receiving report (#1388) - crashtracker: support cxx bindings for crashinfo (#1379) [APMSP-2590]: https://datadoghq.atlassian.net/browse/APMSP-2590?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>

What does this PR do?
This PR adds support for applications to report unhandled exceptions through the libdatadog crashtracking infrastructure.
I expose an API
report_unhandled_exceptionwhich takes in a complete stacktrace, optional exception message, and optional exception type. It then uses pre-existing functionality to pipe over this data along with other data collected by the crashtracker to the receiver, generating a crash report for unhandled exceptions.I decide to reuse the current emit code logic and an enum for ErrorKind specific parameters and have conditional logic to decide what to emit based on Kind. This lets us keep the report generation largely unified, making sure that there is no drift.
Another design choice could have been implementing a separate flow to create the crash report piece by piece for unhandled exceptions and upload it directly to an endpoint, but I greatly!!! prefer to reuse a slightly modified emit flow, to minimize drift and ensure parity between to two different "types" of crash reports.
PR below on the stack: feat(crashtracking): include Kind in crash ping and clarify requirements
PR above on the stack: feat(crashtracking): unhandled exception reporting FFI
Motivation
Additional Notes
Example output
How to test the change?
Unit test, bin test, instrument application and emit a crash report for an unhandled exception