Module telemetry
quic and std only.Expand description
OpenTelemetry metrics for endpoints and the connections they carry.
Nothing is recorded unless an endpoint is built with
EndpointBuilder::with_metrics.
A connection is recorded once, at its first terminal outcome: its duration runs from
creation to that outcome, and its UDP totals are the ones it had then, so traffic of a
closing or draining period that follows is not counted. Connection series carry quic.side
(client, server) and quic.version (1, 2, other); ended connections also carry
quic.close.reason and quic.handshake.completed:
quic.connection.durationandquic.connection.closed;quic.connection.handshake.duration, recorded when the handshake completes;quic.connection.bytes{direction=sent,received}: UDP payload bytes;quic.connection.lost_packets: packets declared lost on the connection’s last path;quic.connection.datagrams.gated{direction}: datagrams the datagram gates dropped.
Endpoint counters are read on collection and summed over every endpoint built with the same
QuicMetrics (or a clone of it), dropped endpoints included, so a total never falls. Two
separately created QuicMetrics report the same series unless their
MeterOptions attributes tell them apart. Exported endpoint counters:
quic.endpoint.handshakes{outcome=accepted,outgoing,refused,ignored}:refusedandignoredare attempts the application refused or ignored;quic.endpoint.handshakes.expired: attempts that expired before the application took them;quic.endpoint.admission.refused{reason=at_limit,per_source,unvalidated} andquic.endpoint.admission.retried: attempts the endpoint refused or answered with a Retry under load, before the application saw them;quic.endpoint.datagrams.received, andquic.endpoint.datagrams.droppedfor those a saturated receive queue dropped;quic.endpoint.receive.truncated_entries: receive entries discarded whole for a truncated datagram (entries, not datagrams);quic.endpoint.receive.errors_ignored: receive errors ignored as injectable noise;quic.endpoint.responses.dropped{reason=queue_full,send_failed}: stateless responses that never left.
Occupancy (attempts in progress, queue use, retained sockets) is not exported; it is in
Endpoint::stats.
Structs§
- Quic
Metrics - Metrics shared by the endpoints built with it, and by their connections.