Skip to content

Commit 8408c6a

Browse files
committed
better telemetry integration
1 parent 7b74faf commit 8408c6a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ struct Opts {
2727
/// Write collected information to OUTPUT as JSON
2828
#[clap(long, short = 'o')]
2929
output: Option<PathBuf>,
30+
31+
#[clap(flatten)]
32+
pub telemetry_arguments: TelemetryOptions,
3033
}
3134

3235
mod built_info {
@@ -36,7 +39,9 @@ mod built_info {
3639
fn main() {
3740
let opts = Opts::parse();
3841

39-
let _ = Tracing::pre_configured(APP_NAME, TelemetryOptions::default()).init();
42+
let _trace_guard = Tracing::pre_configured(APP_NAME, opts.telemetry_arguments)
43+
.init()
44+
.unwrap();
4045

4146
// Wrap *all* output in a span, to separate it from main app output.
4247
let _span = tracing::error_span!("containerdebug").entered();

0 commit comments

Comments
 (0)