- add: metrics exporting

This commit is contained in:
2025-03-09 17:05:14 -04:00
parent c4d3da1f94
commit 0dc69bcfcf
7 changed files with 22 additions and 3 deletions

View File

@@ -11,6 +11,12 @@ lazy_static! {
"Total number of packets received"
).unwrap();
// Counter to track the number of packets sent
pub static ref PACKETS_SENT: Counter = register_counter!(
"packets_sent_total",
"Total number of packets sent"
).unwrap();
// Gauge to track the number of active connections
pub static ref ACTIVE_CONNECTIONS: Gauge = register_gauge!(
"active_connections",