mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 15:39:58 +00:00
TUN-8701: Simplify flow registration logs for datagram v3
To help reduce the volume of logs during the happy path of flow registration, there will only be one log message reported when a flow is completed. There are additional fields added to all flow log messages: 1. `src`: local address 2. `dst`: origin address 3. `durationMS`: capturing the total duration of the flow in milliseconds Additional logs were added to capture when a flow was migrated or when cloudflared sent off a registration response retry. Closes TUN-8701
This commit is contained in:
@@ -619,16 +619,12 @@ func newMockSession() mockSession {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *mockSession) ID() v3.RequestID {
|
||||
return testRequestID
|
||||
}
|
||||
|
||||
func (m *mockSession) ConnectionID() uint8 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *mockSession) Migrate(conn v3.DatagramConn) { m.migrated <- conn.ID() }
|
||||
func (m *mockSession) ResetIdleTimer() {}
|
||||
func (m *mockSession) ID() v3.RequestID { return testRequestID }
|
||||
func (m *mockSession) RemoteAddr() net.Addr { return testOriginAddr }
|
||||
func (m *mockSession) LocalAddr() net.Addr { return testLocalAddr }
|
||||
func (m *mockSession) ConnectionID() uint8 { return 0 }
|
||||
func (m *mockSession) Migrate(conn v3.DatagramConn, log *zerolog.Logger) { m.migrated <- conn.ID() }
|
||||
func (m *mockSession) ResetIdleTimer() {}
|
||||
|
||||
func (m *mockSession) Serve(ctx context.Context) error {
|
||||
close(m.served)
|
||||
|
Reference in New Issue
Block a user