Compare commits

...
3 Commits
qa ... dev
Author SHA1 Message Date
Matthew Jackson db3b78e1f9 docs: 1.8.2 release notes 2026-10-07 09:59:54 -07:00
Matthew Jackson f44de130b6 docs: shorter changelog entry for the online timing logs 2026-10-07 08:47:00 -07:00
Matthew Jackson c562bfbad0 online: log the connection-slot wait and DNS lookup time
Address count only, never the address. Separates local waits from the
key-service POST when a lookup is slow.
2026-10-07 03:31:30 -07:00
2 changed files with 22 additions and 1 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## [1.8.2] — Unreleased
### Added
- The online source logs its connection-slot wait and DNS time before each request.
## [1.8.1] — 2026-10-07
### Changed
+16 -1
View File
@@ -517,7 +517,9 @@ fn run_on_worker(
halt: &Halt,
work: impl FnOnce() -> WorkerOutcome + Send + 'static,
) -> Result<Vec<UnitKey>, Error> {
let waited = std::time::Instant::now();
let slot = acquire_query_slot(host, halt)?;
tracing::info!(target: "freemkv::keysource", phase = "keyserver_slot", waited_ms = waited.elapsed().as_millis() as u64, "key-service connection slot acquired");
let (tx, rx) = mpsc::channel();
let spawned = std::thread::Builder::new()
.name("keysource-online".into())
@@ -788,7 +790,20 @@ impl PostJob {
None => resolve_and_guard(&self.url),
};
#[cfg(not(test))]
let guarded = resolve_and_guard(&self.url);
let guarded = {
let t0 = std::time::Instant::now();
let g = resolve_and_guard(&self.url);
// Count only: the addresses themselves are never logged.
tracing::info!(
target: "freemkv::keysource",
phase = "keyserver_dns",
ok = g.is_ok(),
addrs = g.as_ref().map(|a| a.len()).unwrap_or(0),
elapsed_ms = t0.elapsed().as_millis() as u64,
"key-service host resolved"
);
g
};
// Resolve + SSRF-guard the host just before the POST and pin the validated addresses,
// so a DNS rebind after config time can't redirect the request to an internal host.
let pinned = match guarded {