log/sockstatlog: bump logInterval to 10 seconds

We are seeing indications that some devices are still getting into an
upload loop.  Bump logInterval in case these devices are on slow
connections that are taking more than 3 seconds to uploads sockstats.

Updates #7719

Signed-off-by: Will Norris <will@tailscale.com>
pull/7939/head
Will Norris 2 years ago committed by Will Norris
parent 4722f7e322
commit 7f17e04a5a

@ -33,7 +33,7 @@ const pollInterval = time.Second / 10
// logInterval specifies how often to log sockstat events to disk. // logInterval specifies how often to log sockstat events to disk.
// This delay is added to prevent an infinite loop when logs are uploaded, // This delay is added to prevent an infinite loop when logs are uploaded,
// which itself creates additional sockstat events. // which itself creates additional sockstat events.
const logInterval = 3 * time.Second const logInterval = 10 * time.Second
// maxLogFileSize specifies the maximum size of a log file before it is rotated. // maxLogFileSize specifies the maximum size of a log file before it is rotated.
// Our logs are fairly compact, and we are mostly only looking at a few hours of data. // Our logs are fairly compact, and we are mostly only looking at a few hours of data.
@ -83,7 +83,7 @@ type event struct {
// SockstatLogID reproducibly derives a new logid.PrivateID for sockstat logging from a node's public backend log ID. // SockstatLogID reproducibly derives a new logid.PrivateID for sockstat logging from a node's public backend log ID.
// The returned PrivateID is the sha256 sum of logID + "sockstat". // The returned PrivateID is the sha256 sum of logID + "sockstat".
// If a node's public log ID becomes known, it is trivial to spoof sockstat logs for that node. // If a node's public log ID becomes known, it is trivial to spoof sockstat logs for that node.
// Given the this is just for debugging, we're not too concerned about that. // Given that this is just for debugging, we're not too concerned about that.
func SockstatLogID(logID logid.PublicID) logid.PrivateID { func SockstatLogID(logID logid.PublicID) logid.PrivateID {
return logid.PrivateID(sha256.Sum256([]byte(logID.String() + "sockstat"))) return logid.PrivateID(sha256.Sum256([]byte(logID.String() + "sockstat")))
} }

Loading…
Cancel
Save