fix: standardize structured log event names to kebab-case - #52
Open
rcbevans wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
CI failure is the pre-existing flaky test |
Rename 15 log events that used inconsistent naming conventions (spaces, dot-prefix, snake_case) to the kebab-case convention used by the majority of the codebase. This is a breaking change for log pipelines that filter on event names. Renamed events: - "prune completed" -> "prune-completed" - "prune failed" -> "prune-failed" - "archive expiry completed" -> "archive-expiry-completed" - "applied migrations before startup" -> "migrations-applied-before-startup" - "no pending migrations" -> "no-pending-migrations" - "workgroup.child_exit" -> "workgroup-child-exit" - "workgroup.shutdown_signal" -> "workgroup-shutdown-signal" - "workgroup.health_kill" -> "workgroup-health-kill" - "workgroup.background_task_failed" -> "workgroup-background-task-failed" - "workgroup.shutdown_begin" -> "workgroup-shutdown-begin" - "workgroup.shutdown_complete" -> "workgroup-shutdown-complete" - "workgroup.burst_limit_exceeded" -> "workgroup-burst-limit-exceeded" - "job_failed" -> "job-failed" - "watch_reclaims-visibility-risk-probe-failed" -> "watch-reclaims-visibility-risk-probe-failed" - "watch_reclaims-listen-connection-lost" -> "watch-reclaims-listen-connection-lost"
rcbevans
force-pushed
the
fix/log-event-naming
branch
from
July 30, 2026 04:54
5bb55cd to
80dbf30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The codebase used 4+ different naming conventions for structured log event names. The dominant convention (~40+ events) is kebab-case (
conn-close-error,pool-draining,notify-payload-parse-failed). This PR standardizes the 15 non-conforming events to kebab-case.Breaking change
This is a breaking change for log pipelines that filter on event names. Any dashboards, alerts, or log routing rules that match on the old event names will need to be updated.
Renamed events
"prune completed""prune-completed"_leader_sweeps.py"prune failed""prune-failed"_leader_sweeps.py"archive expiry completed""archive-expiry-completed"_leader_sweeps.py"applied migrations before startup""migrations-applied-before-startup"migrate.py"no pending migrations""no-pending-migrations"migrate.py"workgroup.child_exit""workgroup-child-exit"workgroup.py"workgroup.shutdown_signal""workgroup-shutdown-signal"workgroup.py"workgroup.health_kill""workgroup-health-kill"workgroup.py"workgroup.background_task_failed""workgroup-background-task-failed"workgroup.py"workgroup.shutdown_begin""workgroup-shutdown-begin"workgroup.py"workgroup.shutdown_complete""workgroup-shutdown-complete"workgroup.py"workgroup.burst_limit_exceeded""workgroup-burst-limit-exceeded"workgroup.py"job_failed""job-failed"_handlers.py"watch_reclaims-visibility-risk-probe-failed""watch-reclaims-visibility-risk-probe-failed"_taskq.py"watch_reclaims-listen-connection-lost""watch-reclaims-listen-connection-lost"_taskq.pyWhat was changed
logger.info(),logger.warning(),logger.error(), andlogger.critical()calls. Also updated inline comments and docstrings that referenced the old event names.What was NOT changed
typer.echo("no pending migrations")incli.py— this is a CLI output string, not a structured log event name.watch_reclaims-visibility-delay-at-riskandwatch_reclaims-listen-reconnected— these events already use thewatch_reclaimssnake_case prefix but were not in scope for this audit. They can be addressed in a follow-up if desired.Verification
uv run ruff check .— all checks passeduv run ruff format --check .— 475 files already formatteduv run pyright(on changed source files) — 0 errors, 0 warningsuv run pytest tests/test_notify.py tests/test_leader.py tests/test_leader_prune.py tests/test_shutdown_orchestrator.py tests/test_migrate_coverage.py tests/test_migrate_runner.py tests/test_workgroup.py tests/test_consumer.py tests/test_watch_reclaims.py -v --tb=short -m "not integration"— 267 passed, 35 deselectedsrc/,tests/,docs/— zero hits (only the intentionally-preservedtyper.echoCLI output remains)