feat(factor-outbound-http): report http.response.body.size for WASI p3 responses#3506
Merged
itowlson merged 1 commit intoMay 12, 2026
Conversation
3ecb386 to
06ff177
Compare
… p3 responses Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
06ff177 to
6542f14
Compare
Collaborator
calebschoepp
left a comment
There was a problem hiding this comment.
Seems fine from an OTel perspective. Maybe @dicej can comment from a P3/HTTP perspective.
dicej
approved these changes
May 12, 2026
Contributor
dicej
left a comment
There was a problem hiding this comment.
LGTM, thanks.
This is a good reminder that we need more test coverage for this kind of thing. I see there is a basic otel_smoke_test in tests/integration.rs, but it doesn't currently do much. Expanding that test to check for e.g. http.response.body.size and make it run both p2 and p3 components seems appropriate.
We might also be able to unit test this kind of thing using e.g. https://crates.io/crates/tracing-fluent-assertions, although I don't personally have experience with that.
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.
Description
Adds the stable OpenTelemetry semantic convention
http.response.body.sizeto thespin_outbound_http.send_requestspan for outbound HTTP calls made through the WASI p3 interface.Key points
Content-Lengthguess.Ready(None)oris_end_stream()) triggers the recording exactly once via a deferredSpan::recordon the instrumented span.tracing::warn!().Partially resolve #3188 (Option 2).