feat(client): add timestamp to ClientEvent::Warning

Include a timestamp when reporting warnings to allow consumers like the machine-readable formatter to provide temporal context for troubleshooting.
This commit is contained in:
Nils Andreas Svee committed 2026-05-11 09:50:16 +07:00
1 parent 1a04f44bb5
commit 5f6bff5dcb
5 files changed
+13 -4

No files matched your search

+4
View File
@@ -319,6 +319,7 @@ impl Client {
return Ok(vec![ClientEvent::Warning {
kind: WarningKind::MalformedOrUnrelatedPacket,
message: "dropped malformed or unrelated packet".to_owned(),
at: now,
}]);
};
self.process_echo_reply(reply, packet_len, now, datagram.meta)
@@ -415,6 +416,7 @@ impl Client {
return Ok(vec![ClientEvent::Warning {
kind: WarningKind::MalformedOrUnrelatedPacket,
message: "dropped malformed or unrelated packet".to_owned(),
at: now,
}]);
};
self.process_echo_reply(reply, packet_len, now, meta)
@@ -447,6 +449,7 @@ impl Client {
"dropped reply with wrong token: expected {token:#x}, got {:#x}",
reply.token
),
at: now,
}]);
}
@@ -561,6 +564,7 @@ impl Client {
message: format!(
"dropped reply with untracked seq {wire_seq} (no pending or completed entry)"
),
at: now,
}])
}
}