runInNewSpan<O> abstract method
Wraps next in a new span described by metadata.
Implementations must call next and return its result. Providers that
create a real span may pass a SpanContext representing it, so that
trace/span ids and mid-execution metadata propagate; providers that don't
track ids (e.g. a logger) can simply call next() with no argument.
Implementation
Future<O> runInNewSpan<O>(
SpanMetadata metadata,
Future<O> Function([SpanContext? span]) next,
);