Skip to content

Commit e8ebe6a

Browse files
[mq] [skip ddci] working branch - merge 1b5f105 on top of main at 8f611f3
{"baseBranch":"main","baseCommit":"8f611f35b75ecf59c84b3b3545c8f5babc4d1739","createdAt":"2026-03-16T22:16:14.192394Z","headSha":"1b5f105c4e5db1bf216f138b71a07be9621d7c4f","id":"e1aa1526-9c0f-4bae-a172-695c79574663","nextMergeabilityCheckAt":"2026-03-16T23:36:01.906176Z","priority":"200","pullRequestNumber":"1741","queuedAt":"2026-03-16T22:36:05.982279Z","status":"STATUS_QUEUED"}
2 parents 2e2029f + 1b5f105 commit e8ebe6a

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

libdd-crashtracker/src/crash_info/errors_intake.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::time::SystemTime;
55

66
use crate::{OsInfo, SigInfo};
77

8-
use super::{build_crash_ping_message, CrashInfo, Experimental, Metadata, StackTrace};
8+
use super::{build_crash_ping_message, CrashInfo, Experimental, Metadata, StackTrace, LIBC};
99
use anyhow::Context;
1010
use chrono::{DateTime, Utc};
1111
use http::{uri::PathAndQuery, Uri};
@@ -363,6 +363,7 @@ fn build_crash_info_tags(crash_info: &CrashInfo) -> String {
363363
append_signal_tags(&mut tags, siginfo);
364364
}
365365

366+
tags.push_str(&format!(",libc:{LIBC}"));
366367
tags
367368
}
368369

@@ -456,6 +457,8 @@ impl ErrorsIntakePayload {
456457
append_signal_tags(&mut ddtags, sig_info);
457458
}
458459

460+
ddtags.push_str(&format!(",libc:{LIBC}"));
461+
459462
let (error_type, message) = if let Some(sig_info) = sig_info {
460463
(
461464
Some(format!("{:?}", sig_info.si_signo_human_readable)),
@@ -689,6 +692,7 @@ mod tests {
689692
"si_code_human_readable:SEGV_BNDERR",
690693
"si_signo:11",
691694
"si_signo_human_readable:SIGSEGV",
695+
&format!("libc:{}", super::super::LIBC),
692696
];
693697

694698
let expected_metadata_tags = ["service:foo", "version:bar", "language_name:native"];
@@ -726,6 +730,7 @@ mod tests {
726730
"si_code_human_readable:SEGV_BNDERR",
727731
"si_signo:11",
728732
"si_signo_human_readable:SIGSEGV",
733+
&format!("libc:{}", super::super::LIBC),
729734
];
730735

731736
for tag in expected_tags {

libdd-crashtracker/src/crash_info/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ mod telemetry;
1717
mod test_utils;
1818
mod unknown_value;
1919

20+
#[cfg(target_env = "musl")]
21+
pub(crate) const LIBC: &str = "musl";
22+
#[cfg(target_env = "gnu")]
23+
pub(crate) const LIBC: &str = "glibc";
24+
#[cfg(target_env = "msvc")]
25+
pub(crate) const LIBC: &str = "msvc";
26+
#[cfg(not(any(target_env = "musl", target_env = "gnu", target_env = "msvc")))]
27+
pub(crate) const LIBC: &str = "";
28+
2029
pub use builder::*;
2130
pub use error_data::*;
2231
pub use errors_intake::*;

libdd-crashtracker/src/crash_info/telemetry.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::{fmt::Write, time::SystemTime};
44

55
use crate::{ErrorKind, SigInfo};
66

7-
use super::{CrashInfo, Metadata};
7+
use super::{CrashInfo, Metadata, LIBC};
88
use anyhow::Context;
99
use chrono::{DateTime, Utc};
1010
use libdd_common::Endpoint;
@@ -396,6 +396,7 @@ impl TelemetryCrashUploader {
396396
));
397397
}
398398

399+
write!(tags, ",libc:{LIBC}").ok();
399400
self.append_optional_tags(&mut tags);
400401
tags
401402
}
@@ -448,6 +449,7 @@ fn extract_crash_info_tags(crash_info: &CrashInfo) -> anyhow::Result<String> {
448449
siginfo.si_signo_human_readable
449450
)?;
450451
}
452+
write!(&mut tags, ",libc:{LIBC}")?;
451453
Ok(tags)
452454
}
453455

@@ -556,6 +558,7 @@ mod tests {
556558
"si_signo_human_readable:SIGSEGV",
557559
"si_signo:11",
558560
"uuid:1d6b97cb-968c-40c9-af6e-e4b4d71e8781",
561+
&format!("libc:{}", super::super::LIBC),
559562
]),
560563
tags
561564
);

0 commit comments

Comments
 (0)