[mode;-gateway] add back fixes of incorrect metrics after worker removal (#15624)

This commit is contained in:
fzyzcjy
2025-12-23 18:50:03 -08:00
committed by GitHub
parent aef7ca7cf2
commit 4d64f15086
2 changed files with 20 additions and 1 deletions
@@ -11,7 +11,10 @@ use std::sync::Arc;
use dashmap::DashMap;
use uuid::Uuid;
use crate::core::{ConnectionMode, RuntimeType, Worker, WorkerType};
use crate::{
core::{ConnectionMode, RuntimeType, Worker, WorkerType},
observability::metrics::Metrics,
};
/// Unique identifier for a worker
#[derive(Debug, Clone, Hash, Eq, PartialEq)]
@@ -168,6 +171,7 @@ impl WorkerRegistry {
}
worker.set_healthy(false);
Metrics::remove_worker_metrics(worker.url());
Some(worker)
} else {