Skip to content

Commit f577eab

Browse files
thomasywangfacebook-github-bot
authored andcommitted
Log to monarch_executions directly (#1988)
Summary: Each process only logs to monarch_executions once at the beginning of the execution so there is no need to add a scuba client that logs to this table into our tracing subscriber Reviewed By: vidhyav Differential Revision: D87664117
1 parent 36fa53d commit f577eab

File tree

1 file changed

+15
-0
lines changed
  • hyperactor_telemetry/src

1 file changed

+15
-0
lines changed

hyperactor_telemetry/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ pub fn initialize_logging_with_log_prefix(
650650
tracing::debug!("logging already initialized for this process: {}", err);
651651
}
652652
let exec_id = env::execution_id();
653+
// setting target to "execution" will prevent the monarch_tracing scuba client from logging this
653654
tracing::info!(
654655
target: "execution",
655656
execution_id = exec_id,
@@ -665,6 +666,20 @@ pub fn initialize_logging_with_log_prefix(
665666
revision = build_info::BuildInfo::get_revision(),
666667
"logging_initialized"
667668
);
669+
// here we have the monarch_executions scuba client log
670+
meta::log_execution_event(
671+
&exec_id,
672+
&Env::current().to_string(),
673+
std::env::args().collect(),
674+
build_info::BuildInfo::get_build_mode(),
675+
build_info::BuildInfo::get_compiler(),
676+
build_info::BuildInfo::get_compiler_version(),
677+
build_info::BuildInfo::get_rule(),
678+
build_info::BuildInfo::get_package_name(),
679+
build_info::BuildInfo::get_package_release(),
680+
build_info::BuildInfo::get_upstream_revision(),
681+
build_info::BuildInfo::get_revision(),
682+
);
668683

669684
if !is_layer_disabled(DISABLE_OTEL_METRICS) {
670685
otel::init_metrics();

0 commit comments

Comments
 (0)