Commit Detail
Commit 83a4a68
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.