Reset connection stage timestamps during reconnections to exclude unnecessary metrics tracking

This commit is contained in:
Zoltán Papp
2026-01-28 15:59:24 +01:00
parent 5169129029
commit cbfde79dd8
4 changed files with 41 additions and 48 deletions

View File

@@ -84,7 +84,7 @@ func (m *victoriaMetrics) RecordConnectionStages(
m.getMetricName("netbird_peer_connection_total_creation_to_handshake", connTypeStr, attemptType),
).Update(totalDuration)
log.Infof("--- Peer connection metrics [%s, %s, %s]: creation→semaphore: %.3fs, semaphore→signaling: %.3fs, signaling→connection: %.3fs, connection→handshake: %.3fs, total: %.3fs",
log.Tracef("peer connection metrics [%s, %s, %s]: creation→semaphore: %.3fs, semaphore→signaling: %.3fs, signaling→connection: %.3fs, connection→handshake: %.3fs, total: %.3fs",
m.deploymentType.String(), connTypeStr, attemptType,
creationToSemaphore, semaphoreToSignaling, signalingToConnection, connectionToHandshake,
totalDuration)