Prune push-diag log lines #17
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
posta/chat#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
The
slog.Info("push-diag.…")calls scattered acrossinternal/sse/hub.go,internal/web/events.go, andinternal/web/push.gowere added during a debugging session for the push-keepalive-restart-gap incident and never cleaned up. For each call site, decide: promote to a permanent counter / structured-log channel (if the signal is durable observability), or delete (if it was a one-time investigation aid).Known sites (non-exhaustive):
push-diag.advance_watermarkinhub.gopush-diag.on_inboundinpush.gopush-diag.events.subscribe,push-diag.active_peer.postinevents.go(may already be deleted by the active-peer migration issue)Acceptance criteria
grep -r push-diag internal/returns no matchesBlocked by
None - can start immediately
Agent Brief
Category: enhancement
Summary: Remove the
push-diag.*slog.Infolines added during a past debugging session. Default is delete; promote to a documented counter orDebug-level log only when the signal would be useful for operating the system long-term.Current behavior:
Four
slog.Info("push-diag.…")call sites exist across the live-update and push code paths. They were added during the push-keepalive-restart-gap incident and never cleaned up. Two of them are noisy: they fire on every inbound message atInfolevel.Desired behavior:
grep -r 'push-diag\.' internal/returns no matches. For each removed line, the PR description either notes "one-off diagnostic, no longer needed" or — for the small subset worth keeping — describes the durable signal and the replacement (a counter or aDebug-level log call with a non-push-diagname).Per-site notes:
Two of the four call sites are inside code paths that the active-peer migration deletes (
push-diag.events.subscribein the /events handler,push-diag.active_peer.postin the active-peer POST handler). If that migration lands first they vanish naturally; if this issue lands first the agent removes them outright. Either ordering is fine.The remaining two —
push-diag.on_inboundin the push dispatcher andpush-diag.advance_watermarkin the hub — are the real decision points. Both fire on every inbound message. AtInfolevel they pollute production logs.Decision guidance for the agent:
Delete by default. A promotion is justified only if all three are true:
push-diagprefix.If a promotion is justified, prefer a counter (e.g.
expvar-style orslogatDebug) over anInfolog. Per-eventInfologs on a hot path are not durable observability.Acceptance criteria:
grep -r 'push-diag\.' internal/returns no matchespush-diagsignalslog.Infocalls on the inbound hot pathOut of scope:
push-diag.*lines)