diff --git a/src/telescope/src/Aspect/GuzzleHttpClientAspect.php b/src/telescope/src/Aspect/GuzzleHttpClientAspect.php index 7476e5aac..b33f6a604 100644 --- a/src/telescope/src/Aspect/GuzzleHttpClientAspect.php +++ b/src/telescope/src/Aspect/GuzzleHttpClientAspect.php @@ -68,14 +68,13 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) 'method' => $request->getMethod(), 'uri' => $request->getUri()->__toString(), 'headers' => $request->getHeaders(), - 'duration' => $stats->getTransferTime() * 1000, + 'duration' => floor(($stats->getTransferTime() ?? 0) * 1000), ]; - - if ($response = $stats->getResponse()) { + if ($response) { $content['response_status'] = $response->getStatusCode(); $content['response_headers'] = $response->getHeaders(); $content['response_reason'] = $response->getReasonPhrase(); - $content['response_payload'] = $this->getResponsePayload($response, $options); + $content['response'] = $this->getResponsePayload($response, $options); } Telescope::recordClientRequest(IncomingEntry::make($content));