src/StackdriverExporter.php
public function export(array $spans)
    {
        if (empty($spans)) {
            return false;
        }

        // Pull the traceId from the first span
        $spans = array_map([SpanConverter::class, 'convertSpan'], $spans);
        $rootSpan = $spans[0];
        $trace = self::$client->trace(
            $rootSpan->traceId()
        );

        // build a Trace object and assign Spans
        $trace->setSpans($spans);

        try {
            return $this->batchRunner->submitItem($this->identifier, $trace);
        } catch (\Exception $e) {
            error_log('Reporting the Trace data failed: ' . $e->getMessage());
            return false;
        }
    }
public function export(array $spans)
    {
        if (empty($spans)) {
            return false;
        }

        // Pull the traceId from the first span
        $spans = array_map([SpanConverter::class, 'convertSpan'], $spans);
        $rootSpan = $spans[0];
        $trace = self::$client->trace(
            $rootSpan->traceId()
        );

        // build a Trace object and assign Spans
        $trace->setSpans($spans);

        try {
            return $this->batchRunner->submitItem($this->identifier, $trace);
        } catch (\Exception $e) {
            error_log('Reporting the Trace data failed: ' . $e->getMessage());
            return false;
        }
    }
Report the provided Trace to a backend.

@param SpanData[] $spans
@return bool