public function inSpan(array $spanOptions, callable $callable, array $arguments = [])
    {
        $span = $this->startSpan($spanOptions + [
            'sameProcessAsParentSpan' => !empty($this->spans)
        ]);
        $scope = $this->withSpan($span);
        try {
            return call_user_func_array($callable, $arguments);
        } finally {
            $scope->close();
        }
    }
public function inSpan(array $spanOptions, callable $callable, array $arguments = [])
    {
        $span = $this->startSpan($spanOptions + [
            'sameProcessAsParentSpan' => !empty($this->spans)
        ]);
        $scope = $this->withSpan($span);
        try {
            return call_user_func_array($callable, $arguments);
        } finally {
            $scope->close();
        }
    }
public function inSpan ( array $ spanOptions , callable $ callable , array $ arguments = [ ] ) { $ span = $ this -> startSpan ( $ spanOptions + [ 'sameProcessAsParentSpan' => ! empty ( $ this -> spans ) ] ) ; $ scope = $ this -> withSpan ( $ span ) ; try { return call_user_func_array ( $ callable , $ arguments ) ; } finally { $ scope -> close ( ) ; } }
Instrument a callable by creating a Span that manages the startTime and endTime.

@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 for the callable.
@return mixed The result of the callable
Instrument a callable by creating a Span that manages the startTime and endTime .