OpenTelemetry spans support trace parents, which could be leveraged to establish parent-child links between thread traces.
This requires some way of figuring out which thread is responsible for a CreateThread event. It is possible that this happens within a RunThread–StopThread span, in which case it is relatively easy, or it happens outside of such a span, in which case it'll be important to remember the most recent thread that was executed on each capability.
Unfortunately, this would require that processThreadStateSpans move away from the router model introduced by liftRouter, since this requires cross-thread information sharing.