pub trait Metrics:
Send
+ Sync
+ Clone
+ Unpin
+ 'static {
Show 21 methods
// Required methods
fn connections_in_memory(&self) -> Gauge;
fn maximum_writable_streams(&self) -> Histogram;
fn handshake_time_seconds(&self, stage: QuicHandshakeStage) -> TimeHistogram;
fn write_errors(&self, reason: QuicWriteError) -> Counter;
fn invalid_cid_packet_count(&self, reason: BoxError) -> Counter;
fn accepted_initial_packet_count(&self) -> Counter;
fn expensive_accepted_initial_packet_count(
&self,
peer_ip: IpAddr,
) -> Counter;
fn rejected_initial_packet_count(
&self,
reason: QuicInvalidInitialPacketError,
) -> Counter;
fn expensive_rejected_initial_packet_count(
&self,
reason: QuicInvalidInitialPacketError,
peer_ip: IpAddr,
) -> Counter;
fn utilized_bandwidth(&self) -> Gauge;
fn max_bandwidth_mbps(&self) -> Histogram;
fn max_loss_pct(&self) -> Histogram;
fn udp_drop_count(&self) -> Counter;
fn failed_handshakes(&self, reason: HandshakeError) -> Counter;
fn local_h3_conn_close_error_count(&self, reason: H3Error) -> Counter;
fn local_quic_conn_close_error_count(&self, reason: QuicError) -> Counter;
fn peer_h3_conn_close_error_count(&self, reason: H3Error) -> Counter;
fn peer_quic_conn_close_error_count(&self, reason: QuicError) -> Counter;
fn tokio_runtime_task_schedule_delay_histogram(
&self,
task: &Arc<str>,
) -> TimeHistogram;
fn tokio_runtime_task_poll_duration_histogram(
&self,
task: &Arc<str>,
) -> TimeHistogram;
fn tokio_runtime_task_total_poll_time_micros(
&self,
task: &Arc<str>,
) -> Counter;
}
Expand description
Trait to direct the metrics emitted by the crate to a Prometheus registry.
Required Methods§
Sourcefn connections_in_memory(&self) -> Gauge
fn connections_in_memory(&self) -> Gauge
Number of QUIC connections currently in memory
Sourcefn maximum_writable_streams(&self) -> Histogram
fn maximum_writable_streams(&self) -> Histogram
Maximum number of writable QUIC streams in a connection
Sourcefn handshake_time_seconds(&self, stage: QuicHandshakeStage) -> TimeHistogram
fn handshake_time_seconds(&self, stage: QuicHandshakeStage) -> TimeHistogram
Overhead of QUIC handshake processing stage
Sourcefn write_errors(&self, reason: QuicWriteError) -> Counter
fn write_errors(&self, reason: QuicWriteError) -> Counter
Number of error and partial writes while sending QUIC packets
Sourcefn invalid_cid_packet_count(&self, reason: BoxError) -> Counter
fn invalid_cid_packet_count(&self, reason: BoxError) -> Counter
Number of QUIC packets received where the CID could not be verified.
Sourcefn accepted_initial_packet_count(&self) -> Counter
fn accepted_initial_packet_count(&self) -> Counter
Number of accepted QUIC Initial packets
Sourcefn expensive_accepted_initial_packet_count(&self, peer_ip: IpAddr) -> Counter
fn expensive_accepted_initial_packet_count(&self, peer_ip: IpAddr) -> Counter
Number of accepted QUIC Initial packets using expensive label(s)
Sourcefn rejected_initial_packet_count(
&self,
reason: QuicInvalidInitialPacketError,
) -> Counter
fn rejected_initial_packet_count( &self, reason: QuicInvalidInitialPacketError, ) -> Counter
Number of QUIC packets received but not associated with an active connection
Sourcefn expensive_rejected_initial_packet_count(
&self,
reason: QuicInvalidInitialPacketError,
peer_ip: IpAddr,
) -> Counter
fn expensive_rejected_initial_packet_count( &self, reason: QuicInvalidInitialPacketError, peer_ip: IpAddr, ) -> Counter
Number of QUIC packets received but not associated with an active connection using expensive label(s)
Sourcefn utilized_bandwidth(&self) -> Gauge
fn utilized_bandwidth(&self) -> Gauge
Combined utilized bandwidth of all open connections (max over the past two minutes)
Sourcefn max_bandwidth_mbps(&self) -> Histogram
fn max_bandwidth_mbps(&self) -> Histogram
The highest utilized bandwidh reported during the lifetime of the connection
Sourcefn max_loss_pct(&self) -> Histogram
fn max_loss_pct(&self) -> Histogram
The highest momentary loss reported during the lifetime of the connection
Sourcefn udp_drop_count(&self) -> Counter
fn udp_drop_count(&self) -> Counter
Number of UDP packets dropped when receiving
Sourcefn failed_handshakes(&self, reason: HandshakeError) -> Counter
fn failed_handshakes(&self, reason: HandshakeError) -> Counter
Number of failed quic handshakes
Sourcefn local_h3_conn_close_error_count(&self, reason: H3Error) -> Counter
fn local_h3_conn_close_error_count(&self, reason: H3Error) -> Counter
Number of HTTP/3 connection closures generated locally
Sourcefn local_quic_conn_close_error_count(&self, reason: QuicError) -> Counter
fn local_quic_conn_close_error_count(&self, reason: QuicError) -> Counter
Number of QUIC connection closures generated locally
Sourcefn peer_h3_conn_close_error_count(&self, reason: H3Error) -> Counter
fn peer_h3_conn_close_error_count(&self, reason: H3Error) -> Counter
Number of HTTP/3 connection closures generated by peer
Sourcefn peer_quic_conn_close_error_count(&self, reason: QuicError) -> Counter
fn peer_quic_conn_close_error_count(&self, reason: QuicError) -> Counter
Number of QUIC connection closures generated by peer
Sourcefn tokio_runtime_task_schedule_delay_histogram(
&self,
task: &Arc<str>,
) -> TimeHistogram
fn tokio_runtime_task_schedule_delay_histogram( &self, task: &Arc<str>, ) -> TimeHistogram
Histogram of task schedule delays
Sourcefn tokio_runtime_task_poll_duration_histogram(
&self,
task: &Arc<str>,
) -> TimeHistogram
fn tokio_runtime_task_poll_duration_histogram( &self, task: &Arc<str>, ) -> TimeHistogram
Histogram of task poll durations
Sourcefn tokio_runtime_task_total_poll_time_micros(&self, task: &Arc<str>) -> Counter
fn tokio_runtime_task_total_poll_time_micros(&self, task: &Arc<str>) -> Counter
Helps us get a rough idea of if our waker is causing issues.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.