calebschoepp requested alexcrichton for a review on PR #8384.
calebschoepp requested wasmtime-core-reviewers for a review on PR #8384.
calebschoepp opened PR #8384 from calebschoepp:trace-outbound-request
to bytecodealliance:main
:
This is to support tracing of outbound HTTP request in downstream libraries like Spin.
- Adds tracing to
default_send_request
that follows the OTel HTTP trace semantic conventions.- Makes sure that the trace context is propagated across the async boundary introduced by the spawn.
calebschoepp updated PR #8384.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
I've not used
#[instrument]
myself before, but would it be possible to do something likeurl.full = request.uri()
here in the macro instead of in the body below? I'm not sure if that has type restrictions on the return value of.ur()
, but adding.to_string()
may work well too.Also, mind adding some comments as to what
otel.kind
,otel.name
, andserver.{address,port}
are doing? The first two seem like sort of "standard variables" to set, but the second two aren't set here in the method either.
calebschoepp updated PR #8384.
calebschoepp submitted PR review.
calebschoepp created PR review comment:
Sure, I'll look into that @alexcrichton. Also sorry, I force pushed a linting fix without realizing you'd already started reviewing this.
calebschoepp commented on PR #8384:
@alexcrichton is this something worth backporting to
v18
? It seems like this code changes a reasonable amount betweenv18
andv19
.
alexcrichton commented on PR #8384:
It's possible yeah to backport to 18/19, yeah, but if it works it'd probably be best to get this in
main
and backport it to the 20.0.0 release happening this weekend and having Spin update to 20.0.0
calebschoepp closed without merge PR #8384.
calebschoepp commented on PR #8384:
Closing this b/c after a discussion with @alexcrichton we decided it is best to do this tracing in Spin. A subsequent PR will follow that will expose
handler
for Spin to use.
Last updated: Nov 22 2024 at 16:03 UTC