Skip to main content

max / makenotwork

Revert pom/peer.rs to the mixed tracing idiom bc8e83c6 unified peer.rs on the inline message form. That is the wrong direction and was not a call to make here: the finding behind it says the structured form is the decided log-at-warn shape, and pom is the health monitor, so fields are what a query would key on. Unifying by call-site majority turned five structured sites into string interpolation. The file goes back to carrying both forms, which is the pre-existing state. Which form wins is Max's, and the problem is open again.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-20 20:37 UTC
Signed with PGP, not checked
Commit: 54178b401f92ff316673c28e16e1da91a383fa27
Parent: bc8e83c
1 file changed, +5 insertions, -5 deletions
M pom/src/peer.rs +5 -5
@@ -246,7 +246,7 @@
246 246 // reqwest 0.13's builder can fail and `unwrap_or_default()` panics on
247 247 // the same failure, silently killing this spawned poll task. Log and
248 248 // exit visibly instead.
249 - tracing::error!("{peer_name}: client build failed, poll task exiting: {e}");
249 + tracing::error!(peer = %peer_name, error = %e, "peer: client build failed, poll task exiting");
250 250 return;
251 251 }
252 252 };
@@ -374,17 +374,17 @@
374 374 if let Some(id) = new_identity_id
375 375 && let Err(e) = crate::db::store_peer_identity(pool, peer_name, &id).await
376 376 {
377 - tracing::warn!("{peer_name}: identity store failed: {e}");
377 + tracing::warn!(peer = %peer_name, error = %e, "peer: identity store failed");
378 378 }
379 379 if let Some(id) = updated_identity_id
380 380 && let Err(e) = crate::db::update_peer_identity(pool, peer_name, &id).await
381 381 {
382 - tracing::warn!("{peer_name}: identity update failed: {e}");
382 + tracing::warn!(peer = %peer_name, error = %e, "peer: identity update failed");
383 383 }
384 384 if let Err(e) =
385 385 crate::db::insert_peer_heartbeat(pool, peer_name, "online", latency_ms as i64).await
386 386 {
387 - tracing::warn!("{peer_name}: heartbeat insert failed: {e}");
387 + tracing::warn!(peer = %peer_name, error = %e, "peer: heartbeat insert failed");
388 388 }
389 389
390 390 if let (Some(address), Some(alerter)) = (recovery_info, alerter) {
@@ -455,7 +455,7 @@
455 455 if let Err(e) =
456 456 crate::db::insert_peer_heartbeat(pool, peer_name, &status_str, latency_ms as i64).await
457 457 {
458 - tracing::warn!("{peer_name}: heartbeat insert failed: {e}");
458 + tracing::warn!(peer = %peer_name, error = %e, "peer: heartbeat insert failed");
459 459 }
460 460
461 461 if let (Some((address, failures)), Some(alerter)) = (alert_info, alerter) {