#[non_exhaustive]pub struct Metrics {Show 26 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
pub send_packets_recv: Counter,
pub send_packets_dropped: Counter,
pub other_packets_sent: Counter,
pub other_packets_recv: Counter,
pub other_packets_dropped: Counter,
pub got_ping: Counter,
pub sent_pong: Counter,
pub unknown_frames: Counter,
pub bytes_rx_ratelimited_total: Counter,
pub conns_rx_ratelimited_total: Counter,
pub accepts: Counter,
pub disconnects: Counter,
pub unique_client_keys: Counter,
pub clients_inactive_added: Counter,
pub clients_inactive_removed: Counter,
pub qad_incoming: Counter,
pub qad_incoming_error: Counter,
pub qad_connections: Counter,
pub qad_connections_closed: Counter,
pub qad_connections_errored: Counter,
pub http_connections: Counter,
pub http_connections_closed: Counter,
pub http_connections_errored: Counter,
}server only.Expand description
Metrics tracked for the relay server
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.bytes_sent: CounterBytes sent to a client in RelayToClientDatagram or RelayToClientDatagramBatch frames.
bytes_recv: CounterBytes received from a client in ClientToRelayDatagram or ClientToRelayDatagramBatch frames.
send_packets_sent: CounterRelayToClientDatagram or RelayToClientDatagramBatch frames sent to a client.
send_packets_recv: CounterClientToRelayDatagram or ClientToRelayDatagramBatch frames received from a client.
send_packets_dropped: CounterRelayToClientDatagram or RelayToClientDatagramBatch frames dropped instead of being
delivered to a client, because the recipient is not connected or writing to its stream failed.
Note that frames dropped because the recipient’s send queue is full or closed are not counted here.
other_packets_sent: CounterIntended to count sent frames other than datagrams, but currently unused (never incremented).
other_packets_recv: CounterIntended to count received frames other than datagrams, but currently unused (never incremented).
other_packets_dropped: CounterIntended to count dropped frames other than datagrams, but currently unused (never incremented).
got_ping: CounterNumber of FrameType::Ping frames received from a client.
sent_pong: CounterNumber of FrameType::Pong frames sent to a client.
unknown_frames: CounterIntended to count received frames with an unrecognized FrameType,
but currently unused (never incremented).
bytes_rx_ratelimited_total: CounterNumber of bytes received from client connection which have been rate-limited.
conns_rx_ratelimited_total: CounterNumber of client connections which have had any frames rate-limited.
accepts: CounterNumber of times this server has accepted a connection.
disconnects: CounterNumber of times a client connection was disconnected.
Incremented once per connection, paired with Self::accepts.
unique_client_keys: CounterNumber of unique client keys per day
clients_inactive_added: CounterNumber of times a client was moved into the inactive state.
A client becomes inactive when a new client connects with the same endpoint id. An inactive client can still send messages, but won’t receive anything. If the currently-active client disconnects, and if there are inactive clients, the most-recent inactive client becomes active again.
The number of inactive clients at any time is clients_inactive_added - clients_inactive_removed.
clients_inactive_removed: CounterNumber of times a client was removed from the inactive state.
This is increased whenever a client disconnects while being inactive, or if a client is upgraded to be active again (happens only when the currently-active client for that endpoint id disconnects).
See Self::clients_inactive_added for details on when a client becomes inactive.
qad_incoming: CounterNumber of incoming QAD connections.
After completion, each is counted in either qad_incoming_error or qad_connections.
Thus the number of inflight incomings is qad_incoming - qad_incoming_error - qad_connections.
qad_incoming_error: CounterNumber of QAD QUIC connections that aborted before completing the handshake.
qad_connections: CounterNumber of accepted QAD QUIC connections.
The number of active connections is qad_connections - qad_connections_closed.
qad_connections_closed: CounterNumber of QAD QUIC connections that disconnected after being accepted.
qad_connections_errored: CounterNumber of QAD QUIC connections that disconnected after being accepted, with an error.
The number is included in qad_connections_closed (not in addition to).
http_connections: CounterNumber of accepted HTTP(S) connections.
The number of active connections at any time is http_connections - http_connections_closed
http_connections_closed: CounterNumber of terminated HTTP(S) connections.
http_connections_errored: CounterNumber of HTTP(S) connections that terminated with an error.
The number is included in http_connections_closed (not in addition to).
Trait Implementations§
Source§impl Iterable for Metrics
impl Iterable for Metrics
Source§fn metric_field_count(&self) -> usize
fn metric_field_count(&self) -> usize
Source§fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>
fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>
§fn family_field_count(&self) -> usize
fn family_field_count(&self) -> usize
Family fields in the struct.§fn family_field_ref(&self, _n: usize) -> Option<FamilyItem<'_>>
fn family_field_ref(&self, _n: usize) -> Option<FamilyItem<'_>>
Family field at the given index.Auto Trait Implementations§
impl !Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoIterable for Twhere
T: Iterable,
impl<T> IntoIterable for Twhere
T: Iterable,
§fn as_iterable(&self) -> &dyn Iterable
fn as_iterable(&self) -> &dyn Iterable
self as dyn Iterable