File tree Expand file tree Collapse file tree
packages/rest-tracker-api-core/src/statistics Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,19 +99,22 @@ pub async fn get_labeled_metrics(
9999) -> TrackerLabeledMetrics {
100100 let _torrents_metrics = in_memory_torrent_repository. get_torrents_metrics ( ) ;
101101 let _udp_banned_ips_total = ban_service. read ( ) . await . get_banned_ips_total ( ) ;
102- let _udp_server_stats = udp_server_stats_repository. get_stats ( ) . await ;
103102
104103 let http_stats = http_stats_repository. get_stats ( ) . await ;
105104 let udp_stats_repository = udp_stats_repository. get_stats ( ) . await ;
105+ let udp_server_stats = udp_server_stats_repository. get_stats ( ) . await ;
106106
107- // Merge the metrics from the HTTP and UDP metrics
107+ // Merge all the metrics into a single collection
108108 let mut metrics = MetricCollection :: default ( ) ;
109109 metrics
110110 . merge ( & http_stats. metric_collection )
111111 . expect ( "msg: failed to merge HTTP core metrics" ) ;
112112 metrics
113113 . merge ( & udp_stats_repository. metric_collection )
114114 . expect ( "failed to merge UDP core metrics" ) ;
115+ metrics
116+ . merge ( & udp_server_stats. metric_collection )
117+ . expect ( "failed to merge UDP server metrics" ) ;
115118
116119 TrackerLabeledMetrics { metrics }
117120}
You can’t perform that action at this time.
0 commit comments