The WithSpan method of the Tracer interface is a thin wrapper around the Start method in the default SDK, and expected to be the same for all SDK implementations. Additionally the function signature has been questioned if the closure will indeed serve users. Instead of trying to make a catch all, we'll remove the method and allow users to implement this in the way that best suits their purpose.
I'm also considering if this method should just be dropped from the Tracer interface.
I support removing WithSpan. Anything it does we should be able to accomplish by a defer span.End(). The sort of thing you can't do unless you have a WithSpan-like function is automatically call pprof.Do(), but users can do that on their own.
There is good support for removing WithSpan.
We could introduce a helper, for example.
Perhaps we should specify that span.End() should call recover() and automatically record an error.
Perhaps we should specify that
span.End()should callrecover()and automatically record an error.
That seems timely as it seems to be something the spec is looking to add: https://github.com/open-telemetry/opentelemetry-specification/pull/761/files#diff-05dabeeb80a46b2c02de5a02b8151b2cR18
Most helpful comment
We could introduce a helper, for example.