Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4085/docs/iroh/ Last updated: 2026-04-09T10:47:35Z |
iroh-relay/src/server/metrics.rs
Outdated
| /// Number of accepted QUIC connections. | ||
| pub quic_accepted: Counter, | ||
| /// Number of terminated QUIC connections. | ||
| pub quic_disconnected: Counter, | ||
| /// Number of QUIC connections that terminated with an error. | ||
| /// | ||
| /// The number is *included* in `quic_disconnected` (not in addition to). | ||
| pub quic_disconnected_error: Counter, |
iroh-relay/src/server/metrics.rs
Outdated
| /// Number of accepted TCP connections. | ||
| pub tcp_accepted: Counter, | ||
| /// Number of terminated TCP connections. | ||
| pub tcp_disconnected: Counter, | ||
| /// Number of TCP connections that terminated with an error. | ||
| /// | ||
| /// The number is *included* in `tcp_disconnected` (not in addition to). | ||
| pub tcp_disconnected_error: Counter, |
ef370b3 to
53a31a0
Compare
iroh-relay/src/server/metrics.rs
Outdated
| pub clients_inactive_add: Counter, | ||
|
|
||
| /// Number of times a client was removed from the inactive state. | ||
| /// | ||
| /// Happens when 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). | ||
| pub clients_inactive_remove: Counter, |
There was a problem hiding this comment.
Below you use the passive ("disconnected") andhere you use active. "added" and "removed" makes more sense I think.
iroh-relay/src/server/metrics.rs
Outdated
| /// | ||
| /// After completion, each is counted in qad_accepted_disconnected. | ||
| /// The number of active connections is qad_accepted - qad_accepted_disconnected. | ||
| pub qad_accepted: Counter, |
There was a problem hiding this comment.
IIUC this is the number of connections that existed? Why not qad_connections?
So qad_incoming = qad_incoming_disconnected + qad_accepted, is that correct?
And qad_accepted - qad_accepted_disconnected is the number of currently connected qad connections?
While qad_accepted_disconnected_error < qad_accepted_disconnected?
The naming is weird, I can't think of what is more conventional right now. Maybe:
- qad_incoming
- qad_incoming_error
- qad_connections
- qad_connections_closed
- qad_connections_errored (still a subset of closed, needs to be clearly documented)
The "usual" thing is to have a metric qad_conn_closed with a status field. But it seems that PR still hasn't been merged.
Anyway, would also like @Arqu 's opinion.
There was a problem hiding this comment.
So qad_incoming = qad_incoming_disconnected + qad_accepted, is that correct?
If none are inflight, yes. More correct is
qad_incoming = qad_incoming_disconnected + qad_accepted + qad_inflight
i.e.
qad_inflight = qad_incoming - qad_incoming_disconnected - qad_accepted
There was a problem hiding this comment.
@flub I pushed a commit with renames and expanded docs.
821563f to
d9bd1ba
Compare
| // TODO: only important stat that we cannot track right now | ||
| // pub average_queue_duration: | ||
| // | ||
| /// Number of incoming QUIC connections. |
There was a problem hiding this comment.
| /// Number of incoming QUIC connections. | |
| /// Number of incoming QAD connections. |
Arqu
left a comment
There was a problem hiding this comment.
No complaints from my side
Description
Adds more metrics to the relay server:
Also slightly improves logging for QUIC connections.
Breaking Changes
Notes & open questions
Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendme