public function info()
    {
        $data = [
            'displayName' => [
                'value' => $this->name
            ],
            'spanId' => $this->spanId,
            'startTime' => $this->startTime,
            'endTime' => $this->endTime
        ];
        if ($this->parentSpanId) {
            $data['parentSpanId'] = $this->parentSpanId;
        }
        if ($this->attributes) {
            $data['attributes'] = $this->attributes->info();
        }
        if ($this->timeEvents) {
            $data['timeEvents'] = [
                'timeEvent' => array_map(function ($timeEvent) {
                    return $timeEvent->info();
                }, $this->timeEvents)
            ];
        }
        if ($this->links) {
            $data['links'] = [
                'link' => array_map(function ($link) {
                    return $link->info();
                }, $this->links)
            ];
        }
        if ($this->status) {
            $data['status'] = $this->status->info();
        }
        if ($this->stackTrace) {
            $data['stackTrace'] = $this->stackTrace->info();
        }
        if ($this->sameProcessAsParentSpan !== null) {
            $data['sameProcessAsParentSpan'] = $this->sameProcessAsParentSpan;
        }
        return $data;
    }