[superlog] Downgrade worker.job_stalled log from ERROR to WARN#501
[superlog] Downgrade worker.job_stalled log from ERROR to WARN#501superlog-app[bot] wants to merge 7 commits into
Conversation
…-markdown-evals [codex] Improve Slack insight digest markdown
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
The latest updates on your projects. Learn more about Unkey Deploy
|
|
Parking this as superseded by #479 for the stalled uptime job false-positive incident. #479 is the focused one-file staging PR for the uptime worker stalled event; this PR is currently conflicting and broader. Please keep this one unmerged unless #479 is abandoned and this branch is refreshed/revalidated. |
|
This still has unique value for the insights worker stalled-job path, but the branch is dirty and includes stale unrelated files already present on |
Clean staging replacement for #501. Downgrades stalled insights worker jobs to WARN, adds deterministic job-name inference for stalled-job telemetry, and keeps transient Redis worker errors covered by the earlier helper. Verified locally with targeted insights tests, root lint, root typecheck, root tests, and GitHub CI/health checks.
|
Closed as superseded by #515, which landed on staging as 8fdb1b1.\n\nWhy not merge this original Superlog branch: it was not a clean staging branch and did not preserve all of the related worker-error behavior we wanted from the earlier Redis warning change. The clean replacement keeps the useful behavior only: stalled insights jobs now log WARN, include deterministic job_name context, and unknown job IDs fall back to "unknown" without Redis lookups. Verification on #515: targeted insights tests, scoped Ultracite, root lint, root check-types, root test, and GitHub CI/health checks passed. |
Summary
The insights worker's
stalledBullMQ event handler logged at ERROR severity, creating false-positive incidents in Superlog every time the insights worker restarted or was redeployed while an AI insight generation job was in flight.BullMQ's
stalledevent is part of its built-in resilience mechanism: when a worker loses its heartbeat (e.g., during a Rolling deploy on Railway), active jobs have their locks expire and are automatically moved back towaitingfor retry. This is expected behavior — not an operational failure. Terminal failures (after all retry attempts are exhausted) are already captured at ERROR by the existingworker.on('failed', ...)handler.This patch:
worker.job_stalledfrom ERROR → WARN so normal recovery during deploys no longer pages.job_nameinference from the job ID prefix (e.g.insights-website-*→insights-generate-website) so stalled-event logs are easier to diagnose without querying the job object.An alternative approach would be to suppress the stalled event entirely (just not log it), but keeping it at WARN preserves visibility for cases where stalls happen outside of deploys (e.g. OOM kills or runaway jobs).
Incident on Superlog
Was this PR helpful? Leave feedback — goes straight to the Superlog team.
Summary by cubic
Downgraded
worker.job_stalledlogs from error to warn in the insights worker to stop false Superlog incidents during normalbullmqrecovery. Addedjob_nameinference from job ID prefixes (dispatch, maintenance, rollup, website) to make stalled logs easier to diagnose; terminal failures remain logged as errors via the existing failed handler.Written for commit 3368aa2. Summary will update on new commits.