apollo_config,apollo_config_manager: stop re-logging the config load on every poll - #14932
apollo_config,apollo_config_manager: stop re-logging the config load on every poll#14932matanl-starkware wants to merge 1 commit into
Conversation
…on every poll The config manager reloads the config on a timer, and each reload re-emitted the same three info lines in every pod: the periodic-check heartbeat, the default-values notice, and one line per custom config file. On a config that almost never changes, that is ~7% of sequencer-gateway's log bytes and ~3% of sequencer-mempool's. The startup load is the one worth reading, so the two loading.rs lines now report at info for the first load of the process and at trace afterwards, and the tick heartbeat drops to trace. An actual config change is still reported by log_config_diff, which is untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview In In Reviewed by Cursor Bugbot for commit 7f0051f. Bugbot is set up for automated code reviews on this repo. Configure here. |
What
ConfigManagerRunnerreloads the config on a timer. Each tick re-emitted threeinfo!lines in every pod:config_manager_runner.rs—"ConfigManagerRunner: periodic check triggered, updating config"loading.rs—"Ignoring default values by overriding with an empty map."loading.rs—"Loading custom config file: ..."(once per file)Now:
loading.rslines report atinfo!for the first load of the process andtrace!afterwards, via aCONFIG_LOADED_BEFOREatomic;trace!.Why
Part of a round of log-cost reduction. Measured over 24h of Mainnet logs via Log Analytics, these three lines are ~9.8% of
sequencer-gateway's log bytes and ~3% ofsequencer-mempool's — roughly $60/month fleet-wide. They fire in every pod, forever, for a config that almost never changes.update_configalready compares old vs new and no-ops when nothing changed, butload_and_validate_configunderneath it logged unconditionally.Why not just
debug!Production runs
RUST_LOG=debug,cairo_vm=warn, so demoting todebug!would save nothing.trace!is below the deployed threshold.What's preserved
info!— that is the occurrence anyone actually reads.log_config_diff("ConfigManagerRunner: {key} changed from {old} to {new}") and"Successfully updated dynamic config", both untouched."file change detected") is untouched — it only fires on an actual change.info!on the next attempt.Test plan
cargo build -p apollo_config -p apollo_config_managerSEED=0 cargo test -p apollo_config— 34 passed, 0 failedSEED=0 cargo test -p apollo_config_manager— 15 passed, 0 failedscripts/rust_fmt.sh🤖 Generated with Claude Code