Fix crate-name typo silently suppressing rendezvous-node's own logs - #1212
Open
pattayaguy-stack wants to merge 1 commit into
Open
pattayaguy-stack wants to merge 1 commit into
pattayaguy-stack wants to merge 1 commit into
Conversation
The EnvFilter directive built in init_tracing() reads "rendezvous_server=..." but the package (and therefore the crate target tracing filters match against) is named rendezvous-node / rendezvous_node. Because the directive name never matches, EnvFilter silently drops every info/warn log the binary itself emits in main.rs (PeerRegistered, DiscoverServed, etc.) while the other correctly-named directives (swap_p2p, libp2p, ...) keep working, so there is no visible error -- the binary just runs with its own events invisible. Verified on our own deployment: before this change, we saw zero "Peer registered" / "Discovery served" lines despite the ASB successfully registering against it. After rebuilding with the one-line fix, both lines appeared on the very next restart. (Testing/drafting assisted by Claude Code; the bug, fix and verification above are our own.)
This branch has not been deployed
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 was the problem?
Running
rendezvous-node(libp2p-rendezvous-node), we never saw any ofmain.rs's owntracing::info!/warn!lines (Peer registered,Discovery served, etc.) — not even at startup — even though the ASB was successfully registering against it.How did you find/solve it?
tracing_util.rs'sEnvFilterdirective string is built asrendezvous_server=..., but the package is namedrendezvous-node(crate targetrendezvous_node). Since the directive name never matches the actual crate,EnvFiltersilently drops every log call from the binary's own code, while the other directives in the same string (swap_p2p,libp2p, ...) keep matching normally — so there's no error, just silence from exactly the events you'd want to see to confirm the server is doing its job.One-line fix:
rendezvous_server=->rendezvous_node=.Why this approach?
It's a direct typo fix, no behavior change beyond un-suppressing the logs that were clearly intended to be there (they're referenced by name in the surrounding match arms in main.rs).
Verification
Cargo.toml(name = "rendezvous-node").cargo build --release -p rendezvous-node) andcargo fmt -p rendezvous-node -- --check, both clean.Small aside: Claude Code assisted with drafting this description and running the verification commands above; the bug, the diagnosis and the before/after check are ours.