WithTaskSpanResult is an alias for WithSpanResult. Use it inside a task Execute method. If the context is not a task execution context, the function runs without creating a span.
Parameters
The task execution context.
The name of the span.
The function to wrap.
Returns
The result and error returned byf.