A wrapper around Option<A> that emits a TraceEvent to the
injected Tracer on every combinator call.
Structure-preserving ops return TracedOption<B>, carrying the same spanId
and incrementing seq. Terminal ops (fold, orElse) emit and return the
raw value, exiting the wrapper. unwrap() emits a terminal event too, so a
span never ends without one.
A wrapper around
Option<A>that emits aTraceEventto the injectedTraceron every combinator call.Structure-preserving ops return
TracedOption<B>, carrying the same spanId and incrementing seq. Terminal ops (fold,orElse) emit and return the raw value, exiting the wrapper.unwrap()emits a terminal event too, so a span never ends without one.Example