Skip to content

Commit 5426a8b

Browse files
authored
chore(crashtracking): rename target triple to runtime platform (#1747)
# What does this PR do? We send target triple as `target_triple` tag. This is fine, but runtime platform is a more appropriate name, and maintains parity with profiling: [feat(profiling): add runtime_platform tag automatically](#954) # Motivation What inspired you to submit this pull request? # Additional Notes # How to test the change? corresponding unit tests have been updated Co-authored-by: gyuheon.oh <gyuheon.oh@datadoghq.com>
1 parent e44af12 commit 5426a8b

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

libdd-crashtracker/src/crash_info/errors_intake.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ fn build_crash_info_tags(crash_info: &CrashInfo) -> String {
365365
append_signal_tags(&mut tags, siginfo);
366366
}
367367

368-
tags.push_str(&format!(",target_triple:{TARGET_TRIPLE}"));
368+
tags.push_str(&format!(",runtime_platform:{TARGET_TRIPLE}"));
369369
tags
370370
}
371371

@@ -459,7 +459,7 @@ impl ErrorsIntakePayload {
459459
append_signal_tags(&mut ddtags, sig_info);
460460
}
461461

462-
ddtags.push_str(&format!(",target_triple:{TARGET_TRIPLE}"));
462+
ddtags.push_str(&format!(",runtime_platform:{TARGET_TRIPLE}"));
463463

464464
let (error_type, message) = if let Some(sig_info) = sig_info {
465465
(
@@ -694,7 +694,7 @@ mod tests {
694694
"si_code_human_readable:SEGV_BNDERR",
695695
"si_signo:11",
696696
"si_signo_human_readable:SIGSEGV",
697-
&format!("target_triple:{}", super::super::TARGET_TRIPLE),
697+
&format!("runtime_platform:{}", super::super::TARGET_TRIPLE),
698698
];
699699

700700
let expected_metadata_tags = ["service:foo", "version:bar", "language_name:native"];
@@ -732,10 +732,9 @@ mod tests {
732732
"si_code_human_readable:SEGV_BNDERR",
733733
"si_signo:11",
734734
"si_signo_human_readable:SIGSEGV",
735-
&format!("target_triple:{}", super::super::TARGET_TRIPLE),
735+
&format!("runtime_platform:{}", super::super::TARGET_TRIPLE),
736736
];
737737

738-
println!("payload.ddtags: {}", payload.ddtags);
739738
for tag in expected_tags {
740739
assert!(
741740
payload.ddtags.contains(tag),

libdd-crashtracker/src/crash_info/telemetry.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ impl TelemetryCrashUploader {
396396
));
397397
}
398398

399-
write!(tags, ",target_triple:{TARGET_TRIPLE}").ok();
399+
write!(tags, ",runtime_platform:{TARGET_TRIPLE}").ok();
400400
self.append_optional_tags(&mut tags);
401401
tags
402402
}
@@ -449,7 +449,7 @@ fn extract_crash_info_tags(crash_info: &CrashInfo) -> anyhow::Result<String> {
449449
siginfo.si_signo_human_readable
450450
)?;
451451
}
452-
write!(&mut tags, ",target_triple:{TARGET_TRIPLE}")?;
452+
write!(&mut tags, ",runtime_platform:{TARGET_TRIPLE}")?;
453453
Ok(tags)
454454
}
455455

@@ -558,7 +558,7 @@ mod tests {
558558
"si_signo_human_readable:SIGSEGV",
559559
"si_signo:11",
560560
"uuid:1d6b97cb-968c-40c9-af6e-e4b4d71e8781",
561-
&format!("target_triple:{}", super::super::TARGET_TRIPLE),
561+
&format!("runtime_platform:{}", super::super::TARGET_TRIPLE),
562562
]),
563563
tags
564564
);

0 commit comments

Comments
 (0)