feat(rivetkit-core): trace queue sends and receives - #5730
Conversation
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty TraceOrigin; a later queue receipt cannot link to the queue-send producer span. This makes the advertised queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) (while retaining the shared wrapper state), as the NAPI payload path does.
|
Review: Traced through the full path: schema migration to persistence to span creation to NAPI/TS wiring to tests. This is well-executed; no correctness bugs found. What I checked closely
Minor, non-blocking observations
Nice work overall. The design comments in |
23d24a3 to
c90f7b2
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty TraceOrigin; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
c90f7b2 to
f5d2327
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
f5d2327 to
fd34b25
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
fd34b25 to
16e4368
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
|
Review: Independently traced the full path (schema → persistence → span creation → NAPI/TS wiring → tests) against this PR's current commit. This is well-executed and consistent with the existing invocation-telemetry pattern from the scheduled-fire tracing feature; no correctness bugs found. What I checked closely
Test coverage The new Minor, non-blocking
No security or performance concerns beyond what's already accepted in the sibling scheduled-fire tracing feature this PR extends (traceparent/tracestate from client headers are parsed/normalized through the OTel W3C propagator, not stored raw, before being persisted; ray IDs are bounded and character-restricted via |
16e4368 to
fb29ff8
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
fb29ff8 to
fa09a2e
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
fa09a2e to
c3ef082
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
c3ef082 to
4a4b929
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
4a4b929 to
f3329fb
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
f3329fb to
3219ea9
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
3219ea9 to
e987d4f
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
e987d4f to
1de582e
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
1de582e to
f582735
Compare
| request, | ||
| wait, | ||
| timeout_ms, | ||
| invocation_telemetry: _, |
There was a problem hiding this comment.
🟠 Medium · Preserve queue-send telemetry in the WASM callback context
The new invocation telemetry is discarded before the WASM onQueueSend callback receives its context. Consequently, actorCtx.queue.send() runs on the unbound actor context, so ActorContext::send persists an empty IncomingTraceContext; a later queue receipt cannot link to the queue-send producer span. This makes queue trace propagation fail for WASM actors even though the core span is created.
Construct the callback's WasmActorContext with ctx.inner().clone().with_invocation_telemetry(invocation_telemetry) while retaining the shared wrapper state, as the NAPI payload path does.
NathanFlurry
left a comment
There was a problem hiding this comment.
Reviewed as part of the tracing stack.
run()