[Trivial] Fix request_id span propagation#4590
Conversation
|
Claude finished @fleupold's task in 2m 2s —— View job PR Review: Fix request_id span propagation
VerdictLGTM. This is a correct, minimal fix and the root-cause diagnosis in the description is accurate. Why the fix works — the entire fix hinges on Consistency check — I searched all call sites:
Test — the added No blocking issues, no inline comments. One optional (non-blocking) observation: |
There was a problem hiding this comment.
Code Review
This pull request standardizes the span name and field name used for distributed tracing across the axum integration and the request_id module, updating them to 'http_request' and 'request_id' respectively. It also adds a test to ensure that spans created by make_span can be correctly read by from_current_span. No review comments were provided, and there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Code Review
This pull request aligns the span name and field used for distributed tracing request IDs across the Axum integration and the request ID module. Specifically, it updates SPAN_NAME to 'http_request', introduces SPAN_FIELD as 'request_id', and updates the span creation and recording logic to use these constants consistently. A new integration test was also added to verify that spans created by make_span are correctly readable by from_current_span. No critical issues were found, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
jmg-duarte
left a comment
There was a problem hiding this comment.
Great detective work 🕵️
Description
Follow up on #4582. During testing I noticed that request id is never populated.
Root cause is a wiring mismatch dating back to the observe restructure (#4196). make_span creates the per-request span as
info_span!("http_request", ?request_id, …), butfrom_current_span()only captures a span named "request" with a string field "id".Two things break the capture:
http_requestvsrequest), and?request_idrecords the value viarecord_debug(but its record_debug is a no-op).Note, that this was also breaking forwarding request ids between orderbook/autopilot -> solver calls.
Changes
How to test
unit test +
Manual (e2e):
cargo nextest run -p e2e -E 'test(=eth_integration::local_node_eth_integration)' --run-ignored ignored-only --no-capturerequest_ids=:. This went from 0 (before) to 64 of 281 header lines populated; background/cached RPC calls continue to stay empty (expected).