|
1 | 1 | mod error; |
2 | 2 | mod system_information; |
3 | 3 |
|
4 | | -use clap::{Parser, crate_description, crate_version}; |
| 4 | +use clap::Parser; |
5 | 5 | use stackable_operator::telemetry::Tracing; |
6 | 6 | use std::path::PathBuf; |
7 | 7 |
|
@@ -43,22 +43,27 @@ fn main() { |
43 | 43 | .init() |
44 | 44 | .unwrap(); |
45 | 45 |
|
46 | | - // Wrap *all* output in a span, to separate it from main app output. |
47 | | - let _span = tracing::error_span!("containerdebug").entered(); |
| 46 | + let init_span = tracing::error_span!("containerdebug init").entered(); |
48 | 47 |
|
49 | | - stackable_operator::utils::print_startup_string( |
50 | | - crate_description!(), |
51 | | - crate_version!(), |
52 | | - built_info::GIT_VERSION, |
53 | | - built_info::TARGET, |
54 | | - built_info::BUILT_TIME_UTC, |
55 | | - built_info::RUSTC_VERSION, |
| 48 | + tracing::info!( |
| 49 | + built_info.pkg_version = built_info::PKG_VERSION, |
| 50 | + built_info.git_version = built_info::GIT_VERSION, |
| 51 | + built_info.target = built_info::TARGET, |
| 52 | + built_info.built_time_utc = built_info::BUILT_TIME_UTC, |
| 53 | + built_info.rustc_version = built_info::RUSTC_VERSION, |
| 54 | + "Starting {name}", |
| 55 | + name = built_info::PKG_NAME |
56 | 56 | ); |
57 | 57 |
|
58 | 58 | let mut collect_ctx = SystemInformation::init(); |
59 | 59 |
|
60 | 60 | let mut next_run = Instant::now(); |
| 61 | + |
| 62 | + drop(init_span); |
61 | 63 | loop { |
| 64 | + // Wrap *all* output in a span, to separate it from main app output. |
| 65 | + let _span = tracing::error_span!("containerdebug run").entered(); |
| 66 | + |
62 | 67 | let next_run_sleep = next_run.saturating_duration_since(Instant::now()); |
63 | 68 | if !next_run_sleep.is_zero() { |
64 | 69 | tracing::info!(?next_run, "scheduling next run..."); |
|
0 commit comments