fromIncomingResponse() public method

public fromIncomingResponse ( GuzzleHttp\Message\RequestInterface $originalRequest, GuzzleHttp\Message\ResponseInterface $response = null ) : Span
$originalRequest GuzzleHttp\Message\RequestInterface
$response GuzzleHttp\Message\ResponseInterface
return Tolerance\Tracer\Span\Span
Beispiel #1
0
 /**
  * @param RequestInterface $request
  * @param ResponseInterface|null $response
  */
 public function onEnd(RequestInterface $request, ResponseInterface $response = null)
 {
     try {
         $span = $this->guzzleMessageSpanFactory->fromIncomingResponse($request, $response);
     } catch (\InvalidArgumentException $e) {
         return;
     }
     $this->tracer->trace([$span]);
 }