WithTaskSpan is an alias for WithSpan. Use it inside a task Execute method. If the context is not a task execution context, the function runs without creating a span.
Parameters
context.Context
required
The task execution context.
string
required
The name of the span.
func(context.Context) error
required
The function to wrap.
Returns
The error returned byf, if any.