Skip to content

Commit cd3b00b

Browse files
committed
first commit
1 parent 422fae9 commit cd3b00b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

bin_tests/tests/crashtracker_bin_test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,6 +1542,7 @@ fn test_crash_tracking_bin_with_errors_intake(
15421542
.context("reading errors intake payload")
15431543
.unwrap();
15441544

1545+
assert!(false, "errors_intake_content: {:?}", String::from_utf8_lossy(&errors_intake_content));
15451546
// Validate errors intake payload structure
15461547
assert_errors_intake_payload(&errors_intake_content, crash_typ);
15471548

libdd-crashtracker/src/crash_info/errors_intake.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use std::time::SystemTime;
55

6-
use crate::SigInfo;
6+
use crate::{OsInfo, SigInfo};
77

88
use super::{build_crash_ping_message, CrashInfo, Experimental, Metadata, StackTrace};
99
use anyhow::Context;
@@ -259,6 +259,9 @@ pub struct ErrorsIntakePayload {
259259
pub error: ErrorObject,
260260
#[serde(skip_serializing_if = "Option::is_none")]
261261
pub trace_id: Option<String>,
262+
pub os_info: OsInfo,
263+
#[serde(skip_serializing_if = "Option::is_none")]
264+
pub sig_info: Option<SigInfo>,
262265
}
263266

264267
#[derive(Debug, Default)]
@@ -404,6 +407,9 @@ impl ErrorsIntakePayload {
404407
None
405408
};
406409

410+
let os_info = crash_info.os_info.clone();
411+
let sig_info = crash_info.sig_info.clone();
412+
407413
Ok(Self {
408414
timestamp,
409415
ddsource: "crashtracker".to_string(),
@@ -418,6 +424,8 @@ impl ErrorsIntakePayload {
418424
experimental: crash_info.experimental.clone(),
419425
},
420426
trace_id: None,
427+
os_info,
428+
sig_info,
421429
})
422430
}
423431

@@ -476,7 +484,9 @@ impl ErrorsIntakePayload {
476484
source_type: Some("Crashtracking".to_string()),
477485
experimental: None,
478486
},
487+
sig_info: sig_info.cloned(),
479488
trace_id: None,
489+
os_info: ::os_info::get().into(),
480490
})
481491
}
482492
}

0 commit comments

Comments
 (0)