From f1d0901416ddbdd27f23fe4f1d8c39689104d6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Sun, 26 Feb 2023 12:10:54 +0100 Subject: [PATCH] udp: check statistics.extended config for prometheus --- aquatic_udp/src/workers/statistics/collector.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aquatic_udp/src/workers/statistics/collector.rs b/aquatic_udp/src/workers/statistics/collector.rs index ae029d5..68c7300 100644 --- a/aquatic_udp/src/workers/statistics/collector.rs +++ b/aquatic_udp/src/workers/statistics/collector.rs @@ -129,8 +129,10 @@ impl StatisticsCollector { ); } - self.last_complete_histogram - .update_metrics(self.ip_version.clone()); + if config.statistics.extended { + self.last_complete_histogram + .update_metrics(self.ip_version.clone()); + } } let num_peers: usize = num_peers_by_worker.into_iter().sum();