From 9217d848ee65141b125fa2f86146ff5770f100dd Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 28 Apr 2023 14:38:17 +0200 Subject: [PATCH] Fix: Don't try to create two global tracing subscribers when using bundled runtime --- binaries/daemon/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binaries/daemon/src/main.rs b/binaries/daemon/src/main.rs index c58db3cc2..be189d0bb 100644 --- a/binaries/daemon/src/main.rs +++ b/binaries/daemon/src/main.rs @@ -36,9 +36,6 @@ async fn main() -> eyre::Result<()> { } async fn run() -> eyre::Result<()> { - #[cfg(feature = "tracing")] - set_up_tracing("dora-daemon").wrap_err("failed to set up tracing subscriber")?; - let Args { run_dataflow, machine_id, @@ -50,6 +47,9 @@ async fn run() -> eyre::Result<()> { return tokio::task::block_in_place(dora_daemon::run_dora_runtime); } + #[cfg(feature = "tracing")] + set_up_tracing("dora-daemon").wrap_err("failed to set up tracing subscriber")?; + let ctrl_c_events = { let (ctrl_c_tx, ctrl_c_rx) = mpsc::channel(1); let mut ctrlc_sent = false;