From 92d074ef053061074e1af886b745c3c56e792148 Mon Sep 17 00:00:00 2001 From: Alexandre Choura <42672104+PROFeNoM@users.noreply.github.com> Date: Tue, 28 Nov 2023 16:24:38 +0100 Subject: [PATCH] Use http_code instead of connect_time to detect curl errors (#2391) --- src/Integrations/Integrations/Curl/CurlIntegration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Integrations/Integrations/Curl/CurlIntegration.php b/src/Integrations/Integrations/Curl/CurlIntegration.php index 4d2f3ca655..e3ca348719 100644 --- a/src/Integrations/Integrations/Curl/CurlIntegration.php +++ b/src/Integrations/Integrations/Curl/CurlIntegration.php @@ -132,7 +132,7 @@ public function init() foreach ($spans as $requestSpan) { list($ch, $requestSpan) = $requestSpan; $info = curl_getinfo($ch); - if ($info["connect_time"] <= 0) { + if (empty($info["http_code"])) { $saveSpans = true; if (!isset($error_trace)) { $error_trace = \DDTrace\get_sanitized_exception_trace(new \Exception(), 1);