Feed each inbound message first; true = it was the enable request (consumed).
Open a span; -1 when disabled.
Optionalattrs: Readonly<Record<string, TraceAttrValue>>Optionalattrs: Readonly<Record<string, TraceAttrValue>>Post every finished span now (nothing when there are none).
Time fn; a returned promise ends the span when it settles. Returns fn's result unchanged.
Optionalattrs: Readonly<Record<string, TraceAttrValue>>Sequential phases: end the previous step span and open name (or just
end it, for null). A repeated name keeps the open span, so a progress
callback that reports one phase many times can drive this directly.
Spans for the phases INSIDE one long worker handler (#6979), where
createWorkerTraceHost's one-span-per-message is too coarse. The parser worker runs a whole parse in a singleparsemessage and the host terminates it the momentcompletearrives, so a span posted after the handler settles would die with the worker:flush()posts what has finished so far, and the worker calls it before any message after which it may be terminated.Enabled by the same
enableWorkerTracerequest as the host. Until then every method is a null check, so an untraced load pays nothing measurable.