public function spanData()
    {
        return new SpanData(
            $this->name,
            $this->traceId,
            $this->spanId,
            $this->startTime,
            $this->endTime,
            [
                'parentSpanId' => $this->parentSpanId,
                'attributes' => $this->attributes,
                'timeEvents' => $this->timeEvents,
                'links' => $this->links,
                'status' => $this->status,
                'sameProcessAsParentSpan' => $this->sameProcessAsParentSpan,
                'stackTrace' => $this->stackTrace,
                'kind' => $this->kind
            ]
        );
    }