iroh/net_report/metrics.rs
1use iroh_metrics::{Counter, MetricsGroup};
2use serde::{Deserialize, Serialize};
3
4/// Enum of metrics for the module
5#[derive(Debug, Default, MetricsGroup, Serialize, Deserialize)]
6#[metrics(name = "net_report")]
7#[non_exhaustive]
8pub struct Metrics {
9 /// Number of reports executed by net_report, including full reports.
10 pub reports: Counter,
11 /// Number of full reports executed by net_report
12 pub reports_full: Counter,
13 /// Number of port mapping attempts.
14 pub portmap_attempts: Counter,
15 /// Number of times an external address was obtained via port mapping.
16 pub portmap_external_address_updated: Counter,
17}