feat(observability): make metrics collection optional and granular

Wrap metrics senders in Option and conditionally initialize the monitoring thread to support granular configuration and reduced overhead.
This commit is contained in:
Nils Andreas Svee committed 2026-04-13 15:22:15 +07:00
1 parent 671e3f2671
commit da3487e506
5 files changed
+76 -55

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ pub struct ReflectorSelector {
pub reflector_peers_lock: Arc<RwLock<Vec<IpAddr>>>,
pub reflector_pool: Vec<IpAddr>,
pub trigger_channel: Receiver<bool>,
pub metrics_tx: SyncSender<Metric>,
pub metrics_tx: Option<SyncSender<Metric>>,
}
impl ReflectorSelector {