src/Agent.php
private function collect(): array
    {
        $spans = [];

        foreach ($this->collectors as $collector) {
            foreach ($collector->getSpans() as $span) {
                $spans[] = $this->prepareSpan($span);
            }
        }

        return $spans;
    }
private function collect(): array
    {
        $spans = [];

        foreach ($this->collectors as $collector) {
            foreach ($collector->getSpans() as $span) {
                $spans[] = $this->prepareSpan($span);
            }
        }

        return $spans;
    }
private function collect ( ) : array { $ spans = [ ] ; foreach ( $ this -> collectors as $ collector ) { foreach ( $ collector -> getSpans ( ) as $ span ) { $ spans [ ] = $ this -> prepareSpan ( $ span ) ; } } return $ spans ; }
Collect spans from registered collectors
@return Span[]
@throws \Exception
Collect spans from registered collectors