use std::sync::Arc;
use iroh_metrics::{Counter, MetricsGroup, MetricsGroupSet};
#[derive(Debug, Default, MetricsGroup)]
#[metrics(name = "relayserver")]
pub struct Metrics {
#[metrics(help = "Number of bytes sent.")]
pub bytes_sent: Counter,
#[metrics(help = "Number of bytes received.")]
pub bytes_recv: Counter,
#[metrics(help = "Number of 'send' packets relayed.")]
pub send_packets_sent: Counter,
#[metrics(help = "Number of 'send' packets received.")]
pub send_packets_recv: Counter,
#[metrics(help = "Number of 'send' packets dropped.")]
pub send_packets_dropped: Counter,
#[metrics(help = "Number of packets sent that were not 'send' packets")]
pub other_packets_sent: Counter,
#[metrics(help = "Number of packets received that were not 'send' packets")]
pub other_packets_recv: Counter,
#[metrics(help = "Number of times, non-send packet was dropped.")]
pub other_packets_dropped: Counter,
#[metrics(help = "Number of times the server has received a Ping from a client.")]
pub got_ping: Counter,
#[metrics(help = "Number of times the server has sent a Pong to a client.")]
pub sent_pong: Counter,
#[metrics(help = "Number of unknown frames sent to this server.")]
pub unknown_frames: Counter,
pub bytes_rx_ratelimited_total: Counter,
pub conns_rx_ratelimited_total: Counter,
pub accepts: Counter,
#[metrics(help = "Number of clients that have then disconnected.")]
pub disconnects: Counter,
pub unique_client_keys: Counter,
}
#[derive(Debug, Default, Clone, MetricsGroupSet)]
#[metrics(name = "relay")]
pub struct RelayMetrics {
pub server: Arc<Metrics>,
}