fix(outbound-http): ensure tracing span records land on send_request span for P3#3496
Merged
itowlson merged 2 commits intospinframework:mainfrom May 6, 2026
Merged
Conversation
…span for P3 Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
f2debab to
d8ecc47
Compare
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
2ba7e1a to
d70673a
Compare
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.
Summary
Fix a tracing span propagation bug in the WASI Preview 3 outbound HTTP path.
p3::WasiHttpHooks::send_requestreturns a boxed future. The#[instrument(name = "spin_outbound_http.send_request")]span exits immediately, so laterSpan::record(...)calls (e.g.url.full,server.address) inside the async work were lost.Wrap the async block with
.in_current_span()so the instrumented span remains current when the future is polled. This matches the P2 implementation.cargo test -p spin-factor-outbound-http p3_send_request_propagates_span_to_async_work