feat(crashtracking): report unhandled exceptions#1596
feat(crashtracking): report unhandled exceptions#1596gyuheon0h wants to merge 1 commit intogyuheon0h/crash-ping-kindfrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
📚 Documentation Check Results📦
|
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. |
🔒 Cargo Deny Results📦
|
9d890c4 to
b876b7b
Compare
9becc2b to
82a0aff
Compare
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 0a838b8 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksComparisonBenchmark execution time: 2026-02-18 06:06:02 Comparing candidate commit 0a838b8 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
| exception_message: Option<&str>, | ||
| stacktrace: StackTrace, | ||
| ) -> Result<(), CrashHandlerError> { | ||
| let Some((config, config_str)) = get_config() else { |
There was a problem hiding this comment.
This is an explicit contract with the caller. Error if not upheld
50c6547 to
d4fe74f
Compare
d4fe74f to
cefddfb
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## gyuheon0h/crash-ping-kind #1596 +/- ##
=============================================================
- Coverage 70.96% 70.89% -0.08%
=============================================================
Files 424 424
Lines 62117 62254 +137
=============================================================
+ Hits 44084 44136 +52
- Misses 18033 18118 +85
🚀 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
|

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 itself to the receiver, generating a crash report for unhandled exceptions.I decide to reuse the current emit code logic and add a
stacktracefield, and make signal specific fields optional, and have conditional logic to decide what to emit. This lets us keep the report generation unified making sure that there is no drift.Another design choice could have been implementing a separate flow to create the crash report for the unhandled exception and upload it directly to an endpoint, but I prefer to reuse a slightly modified emit flow, to minimize drift and ensure parity between to two different "types" of crash reports.
Motivation
PR below on the stack: #1595
PR above on the stack: FFI PR WIP
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Unit test, bin test, instrument application and emit a crash report for an unhandled exception