diff --git a/hyperactor/src/channel/net/client.rs b/hyperactor/src/channel/net/client.rs index 52f80ef93..bd59d5dea 100644 --- a/hyperactor/src/channel/net/client.rs +++ b/hyperactor/src/channel/net/client.rs @@ -793,6 +793,8 @@ where .as_ref() .map(|acked_seq| AckedSeqValue(acked_seq.clone())); + use hyperactor_telemetry::skip_record; + tracing::span!( Level::ERROR, "net i/o loop", @@ -802,6 +804,7 @@ where largest_acked = largest_acked.as_value(), outbox = QueueValue::from(&deliveries.outbox.deque).as_value(), unacked = QueueValue::from(&deliveries.unacked.deque).as_value(), + skip_record, ) } diff --git a/hyperactor_mesh/examples/dining_philosophers.rs b/hyperactor_mesh/examples/dining_philosophers.rs index 2106d6b68..7e30c3321 100644 --- a/hyperactor_mesh/examples/dining_philosophers.rs +++ b/hyperactor_mesh/examples/dining_philosophers.rs @@ -232,7 +232,7 @@ impl Waiter { #[tokio::main] async fn main() -> Result { - hyperactor_telemetry::initialize_logging_for_test(); + hyperactor::initialize_with_current_runtime(); // Option: run as a local process mesh // let host_mesh = HostMesh::process(extent!(hosts = 1), BootstrapCommand::current().unwrap()) diff --git a/hyperactor_telemetry/src/lib.rs b/hyperactor_telemetry/src/lib.rs index 0210e0a5e..a3cb80a35 100644 --- a/hyperactor_telemetry/src/lib.rs +++ b/hyperactor_telemetry/src/lib.rs @@ -53,6 +53,21 @@ const ENV_VALUE_TEST: &str = "test"; #[allow(dead_code)] const ENV_VALUE_LOCAL_MAST_SIMULATOR: &str = "local_mast_simulator"; +/// A marker field used to indicate that a span should not be recorded as +/// individual start/end span events; rather the span is purely used to +/// provide context for child events. +/// +/// Note that the mechanism for skipping span recording uses the precise +/// name "skip_record", thus it must be used as a naked identifier: +/// ```ignore +/// use hyperactor_telemetry::skip_record; +/// +/// tracing::span!(..., skip_record); +/// ``` +#[allow(non_upper_case_globals)] +// pub const skip_record: tracing::field::Empty = tracing::field::Empty; +pub const skip_record: bool = true; + pub mod in_memory_reader; #[cfg(fbcode_build)] mod meta;