Skip to content

Commit f975a67

Browse files
authored
[core] improve metric agent connection log (#57056)
The log emitted during the metric agent connection is currently noisy because it runs in a loop. Only emit the initialization log once. Keep the log about connection established the same; the log timestamp will give us the information we need regarding how long the connection takes. Test: - CI <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Reduce log spam by logging "Initializing exporter ..." only once at the start of the retry loop in `MetricsAgentClientImpl::WaitForServerReadyWithRetry`. > > - **Logging**: > - In `src/ray/rpc/metrics_agent_client.cc`, update `MetricsAgentClientImpl::WaitForServerReadyWithRetry` to log `"Initializing exporter ..."` only when `retry_count == 0` (first retry attempt), reducing repeated logs during retries. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 23ece57. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Signed-off-by: Cuong Nguyen <[email protected]>
1 parent f8465ee commit f975a67

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ray/rpc/metrics_agent_client.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ void MetricsAgentClientImpl::WaitForServerReadyWithRetry(
3737
return;
3838
}
3939

40-
RAY_LOG(INFO) << "Initializing exporter ...";
40+
if (retry_count == 0) {
41+
// Only log the first time we start the retry loop.
42+
RAY_LOG(INFO) << "Initializing exporter ...";
43+
}
4144
HealthCheck(rpc::HealthCheckRequest(),
4245
[this, init_exporter_fn](auto &status, auto &&reply) {
4346
if (status.ok() && !exporter_initialized_) {

0 commit comments

Comments
 (0)