forked from torrust/torrust-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmod.rs
More file actions
24 lines (19 loc) · 681 Bytes
/
Copy pathmod.rs
File metadata and controls
24 lines (19 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pub mod event;
pub mod metrics;
pub mod repository;
pub mod services;
use metrics::Metrics;
use torrust_tracker_metrics::metric::description::MetricDescription;
use torrust_tracker_metrics::metric_name;
use torrust_tracker_metrics::unit::Unit;
const UDP_TRACKER_CORE_REQUESTS_RECEIVED_TOTAL: &str = "udp_tracker_core_requests_received_total";
#[must_use]
pub fn describe_metrics() -> Metrics {
let mut metrics = Metrics::default();
metrics.metric_collection.describe_counter(
&metric_name!(UDP_TRACKER_CORE_REQUESTS_RECEIVED_TOTAL),
Some(Unit::Count),
Some(MetricDescription::new("Total number of UDP requests received")),
);
metrics
}