Skip to content

Commit c723ec0

Browse files
committed
Merge branch 'main' into feature/limit-sysinfo
2 parents 819ed55 + 9875895 commit c723ec0

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Changed
8+
9+
- Downgraded DNS errors to warnings ([#17]).
10+
- All output is now wrapped in a "containerdebug" span ([#18]).
11+
12+
[#17]: https://github.com/stackabletech/containerdebug/pull/17
13+
[#18]: https://github.com/stackabletech/containerdebug/pull/18
14+
715
## [0.1.0] - 2024-12-09
816

917
### Added

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ fn main() {
4242
APP_NAME,
4343
opts.tracing_target,
4444
);
45+
46+
// Wrap *all* output in a span, to separate it from main app output.
47+
let _span = tracing::error_span!("containerdebug").entered();
48+
4549
stackable_operator::utils::print_startup_string(
4650
crate_description!(),
4751
crate_version!(),
@@ -64,7 +68,6 @@ fn main() {
6468
let system_information = SystemInformation::collect(&mut collect_ctx);
6569

6670
let serialized = serde_json::to_string_pretty(&system_information).unwrap();
67-
// println!("{serialized}");
6871
if let Some(output_path) = &opts.output {
6972
std::fs::write(output_path, &serialized).unwrap();
7073
}

src/system_information/network.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ impl SystemNetworkInfo {
6767
.into_iter()
6868
.map(|ptr_record| ptr_record.to_utf8())
6969
.collect();
70-
tracing::info!(%ip, ?hostnames, "performed reverse lookup for IP");
70+
tracing::info!(%ip, ?hostnames, "performed reverse DNS lookup for IP");
7171
Some((ip, hostnames))
7272
}
7373
Err(error) => {
74-
tracing::error!(
74+
tracing::warn!(
7575
%ip,
7676
error = &error as &dyn std::error::Error,
77-
"reverse lookup failed"
77+
"reverse DNS lookup failed"
7878
);
7979
None
8080
}
@@ -89,14 +89,14 @@ impl SystemNetworkInfo {
8989
.filter_map(|hostname| match resolver.lookup_ip(hostname.clone()) {
9090
Ok(result) => {
9191
let ips = result.iter().collect();
92-
tracing::info!(hostname, ?ips, "performed forward lookup for hostname");
92+
tracing::info!(hostname, ?ips, "performed forward DNS lookup for hostname");
9393
Some((hostname, ips))
9494
}
9595
Err(error) => {
96-
tracing::error!(
96+
tracing::warn!(
9797
hostname,
9898
error = &error as &dyn std::error::Error,
99-
"forward lookup failed"
99+
"forward DNS lookup failed"
100100
);
101101
None
102102
}

0 commit comments

Comments
 (0)