Repository navigation
head-lag: Serialized can read its own monitor lines at /logs/serialized - #2990
Merged
Merged
Conversation
…ed (#2989) GET /logs/serialized?tail=N on each regional probe returns only the Serialized monitor's lines: connects, drops, each trade over 3 s with its hash, `at` and our receive time, and duplicate deliveries. It takes its own token, SERIALIZED_LOGS_TOKEN in X-Logs-Token, so it can be handed to Serialized without opening the full log. Lines go to a dedicated 20,000-line ring, because the GeckoTerminal tape turns the shared one over in under an hour. Also routes the log package into the capture: it held the original stderr from init, so every log.Printf line (drops, slow trades, duplicates, most of the Codex and OKX paths) never reached /logs. (cherry picked from commit 9aeb4cd)
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.
Adds
GET /logs/serialized?tail=Non each regional head-lag probe (us-east, eu-west, sgp). It returns only the Serialized monitor's lines:atand our receive timeThe endpoint takes its own token,
SERIALIZED_LOGS_TOKEN, sent in theX-Logs-Tokenheader, so it can be shared with Serialized without opening the full log. It answers 403 when the variable is unset. Lines go to a dedicated 20,000-line ring, because the GeckoTerminal tape turns the shared ring over in under an hour.This also fixes
/logsitself. Thelogpackage kept the original stderr from init, so nolog.Printfline ever reached the ring. That covers the drop, slow-trade and duplicate lines, and most of the Codex and OKX output.Tested locally on the real binary:
/logs/serializedreturns only[SERIALIZED]lines, and 403 without the token.log.Printflines now appear in/logs.