Skip to content
Commit Detail

Commit 83a4a68

Author
Kenton Varda <kenton@cloudflare.com> 2025-11-11 17:30:12 -0600
Parents
903f530
Tree
4471e82
Create and hold UserRequestSpan inside IoContext::IncomingRequest.

Otherwise, the UserRequestSpan ends up holding a cyclic reference back to the WorkerTracer, which in some cases might not get cleared, leading to a leak.

This also has the benefit that if, for some reason, the event never ends up being delivered, we don't create a span.

Since the construction of this object differs between workerd and the internal codebase, I had to attach a kj::Function to the WorkerTracer to actually construct the object.

Files changed

5 files changed~5 modified