func WithSpan( ctx context.Context, name string, f func(ctx context.Context) error,) error
Wrap a function with a tracing span using the current runner’s tracer.Use WithSpan inside a task Execute method. If the context is not a task execution context, the function runs without creating a span.