apollo_starknet_client: drop the feeder call-started log, add latency to the outcome - #14929
Open
matanl-starkware wants to merge 1 commit into
Open
apollo_starknet_client: drop the feeder call-started log, add latency to the outcome#14929matanl-starkware wants to merge 1 commit into
matanl-starkware wants to merge 1 commit into
Conversation
… to the outcome `request_with_retry_url` logged twice per feeder HTTP call: once before the call and once after. The pair is the single largest log site on sequencer-core, at 2.21M entries per day each across the six Mainnet nodes and 11.56% of that container's log bytes. The "started" line only told us a call was in flight, which the outcome line now conveys better by carrying the elapsed time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview That outcome log now includes Reviewed by Cursor Bugbot for commit 05be00c. Bugbot is set up for automated code reviews on this repo. Configure here. |
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.
What
request_with_retry_urllogged twice per feeder HTTP call:This drops the "started" line and adds the measured call duration to the outcome line (both the success and the failure branch — failures are where latency matters most, e.g. distinguishing a timeout from an immediate refusal).
Why
Part of a round of log-cost reduction. Measured over 24h of Mainnet logs via Log Analytics, these two lines are the single largest log site on
sequencer-core:sequencer-corebytesreader/mod.rs:214"Call to feeder started"reader/mod.rs:221"Call to feeder succeeded"Together 11.56% of the container, ~$240/month across Mainnet + Testnet. That is ~4.25 feeder calls/sec/node, each costing two log entries.
The "started" line carried no information the outcome line doesn't, other than "a call is in flight" — which the new
elapsedfield conveys, and more usefully.Follow-up worth considering (not in this PR)
The surviving line still formats the URL with
{url:?}, which expands a ~60-character URL into ~400 characters:Switching to
url.as_str()would save roughly another $60/month for a one-token change. I left it out because it changes the log's shape and wasn't part of the agreed scope — happy to fold it in if reviewers want it.Test plan
cargo build -p apollo_starknet_clientSEED=0 cargo test -p apollo_starknet_client— 76 passed, 0 failedscripts/rust_fmt.sh🤖 Generated with Claude Code