public static function inSpan(array $spanOptions, callable $callable, array $arguments = [])
    {
        if (!isset(self::$instance)) {
            return call_user_func_array($callable, $arguments);
        }
        return self::$instance->inSpan($spanOptions, $callable, $arguments);
    }
public static function inSpan(array $spanOptions, callable $callable, array $arguments = [])
    {
        if (!isset(self::$instance)) {
            return call_user_func_array($callable, $arguments);
        }
        return self::$instance->inSpan($spanOptions, $callable, $arguments);
    }
public static function inSpan ( array $ spanOptions , callable $ callable , array $ arguments = [ ] ) { if ( ! isset ( self :: $ instance ) ) { return call_user_func_array ( $ callable , $ arguments ) ; } return self :: $ instance -> inSpan ( $ spanOptions , $ callable , $ arguments ) ; }
Instrument a callable by creating a Span that manages the startTime and endTime.
If an exception is thrown while executing the callable, the exception will be caught,
the span will be closed, and the exception will be re-thrown.

Example:
```
// Instrumenting code as a closure
Tracer::inSpan(['name' => 'some-closure'], function () {
// do something expensive
});
```

```
// Instrumenting code as a callable (parameters optional)
function fib($n) {
// do something expensive
}
$number = Tracer::inSpan(['name' => 'some-callable'], 'fib', [10]);
```

@param array $spanOptions Options for the span. See
<a href="Span.html#method___construct">OpenCensus\Trace\Span::__construct()</a>
@param callable $callable The callable to instrument.
@param array $arguments [optional] Arguments to the callable.
@return mixed Returns whatever the callable returns
Instrument a callable by creating a Span that manages the startTime and endTime . If an exception is thrown while executing the callable the exception will be caught the span will be closed and the exception will be re - thrown .