From 95840756f00f5259a625be4daf8e5f7b4ff9a85f Mon Sep 17 00:00:00 2001 From: Vidhya Venkat Date: Mon, 10 Nov 2025 08:18:53 -0800 Subject: [PATCH] Add better logging Summary: We will be adding better state change info in here. until then ensuring we are logging descriptive text logging. Peng let me know if you want me to keep the older text as well. Differential Revision: D86674557 --- hyperactor_mesh/src/bootstrap.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hyperactor_mesh/src/bootstrap.rs b/hyperactor_mesh/src/bootstrap.rs index 89fd863d4..4054ae864 100644 --- a/hyperactor_mesh/src/bootstrap.rs +++ b/hyperactor_mesh/src/bootstrap.rs @@ -218,16 +218,18 @@ async fn exit_if_missed_heartbeat(bootstrap_index: usize, bootstrap_addr: Channe Ok(tx) => tx, Err(err) => { + // TODO: Log lifecycle state change in here. tracing::error!( - "Failed to establish heartbeat connection to allocator, exiting! (addr: {:?}): {}", + "Failed to establish heartbeat connection from proc to allocator, exiting! (addr: {:?}): {}", bootstrap_addr, err ); std::process::exit(1); } }; + // TODO: Log lifecycle state change in here. tracing::info!( - "Heartbeat connection established to allocator (idx: {bootstrap_index}, addr: {bootstrap_addr:?})", + "Heartbeat connection established from proc to allocator (idx: {bootstrap_index}, addr: {bootstrap_addr:?})", ); loop { RealClock.sleep(Duration::from_secs(5)).await; @@ -240,11 +242,13 @@ async fn exit_if_missed_heartbeat(bootstrap_index: usize, bootstrap_addr: Channe .await; if let Err(err) = result { + // TODO: Log lifecycle state change in here. tracing::error!( - "Heartbeat failed to allocator, exiting! (addr: {:?}): {}", + "Heartbeat failed to be sent from proc to allocator, exiting! (addr: {:?}): {}", bootstrap_addr, err ); + // TODO: Should there be a graceful exit here? std::process::exit(1); } }