public function fromOutgoingRequest(RequestInterface $request)
{
$currentSpan = $this->spanStack->current();
return new Span($this->identifierGenerator->generate(), $this->getName($request), null !== $currentSpan ? $currentSpan->getTraceIdentifier() : $this->identifierGenerator->generate(), [new Annotation(Annotation::CLIENT_SEND, $this->clock->microseconds(), $this->endpointResolver->resolve())], [new BinaryAnnotation('http.host', $request->getHost() ?: '', BinaryAnnotation::TYPE_STRING), new BinaryAnnotation('http.method', $request->getMethod() ?: '', BinaryAnnotation::TYPE_STRING), new BinaryAnnotation('http.path', $request->getPath() ?: '', BinaryAnnotation::TYPE_STRING)], $currentSpan !== null ? $currentSpan->getIdentifier() : null, $currentSpan !== null ? $currentSpan->getDebug() : null);
}