Trace/src/TraceClient.php
public function insertBatch(array $traces, array $options = [])
    {
        $spans = [];
        foreach ($traces as $trace) {
            foreach ($trace->spans() as $span) {
                $spans[] = $this->transformSpan($span);
            }
        }
        // throws ServiceException on failure
        $this->connection->traceBatchWrite([
            'projectsId' => $this->projectId,
            'spans' => $spans
        ] + $options);
        return true;
    }
public function insertBatch(array $traces, array $options = [])
    {
        $spans = [];
        foreach ($traces as $trace) {
            foreach ($trace->spans() as $span) {
                $spans[] = $this->transformSpan($span);
            }
        }
        // throws ServiceException on failure
        $this->connection->traceBatchWrite([
            'projectsId' => $this->projectId,
            'spans' => $spans
        ] + $options);
        return true;
    }
public function insertBatch ( array $ traces , array $ options = [ ] ) { $ spans = [ ] ; foreach ( $ traces as $ trace ) { foreach ( $ trace -> spans ( ) as $ span ) { $ spans [ ] = $ this -> transformSpan ( $ span ) ; } } // throws ServiceException on failure $ this -> connection -> traceBatchWrite ( [ 'projectsId' => $ this -> projectId , 'spans' => $ spans ] + $ options ) ; return true ; }
Sends multiple Trace logs in a simple fashion.

Example:
```
$trace = $traceClient->trace();
$result = $traceClient->insertBatch([$trace]);
```

@codingStandardsIgnoreStart
@see https://cloud.google.com/trace/docs/reference/v1/rest/v1/projects/patchTraces Project patchTraces API documentation.
@codingStandardsIgnoreEnd

@param Trace[] $traces The trace logs to send.
@param array $options [optional] Configuration Options
@return bool
Sends multiple Trace logs in a simple fashion .