You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Instrumentation/Curl/src/CurlInstrumentation.php
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,6 @@
18
18
useOpenTelemetry\SemConv\TraceAttributes;
19
19
useOpenTelemetry\SemConv\Version;
20
20
useWeakMap;
21
-
useWeakReference;
22
21
23
22
class CurlInstrumentation
24
23
{
@@ -35,7 +34,7 @@ public static function register(): void
35
34
* 'handles'=>
36
35
* WeakMap[CurlHandle] => {
37
36
* 'finished' => bool,
38
-
* 'span' => WeakReference<SpanInterface>
37
+
* 'span' => SpanInterface
39
38
* }
40
39
* )
41
40
*/
@@ -327,7 +326,7 @@ public static function register(): void
327
326
}
328
327
$curlSetOptInstrumentationSuppressed = false;
329
328
330
-
$metadata['span'] = WeakReference::create($span);
329
+
$metadata['span'] = $span;
331
330
}
332
331
$mHandle['started'] = true;
333
332
}
@@ -339,7 +338,7 @@ public static function register(): void
339
338
foreach ($handlesas$cHandle => &$metadata) {
340
339
if ($metadata['finished'] == false) {
341
340
$metadata['finished'] = true;
342
-
self::finishMultiSpan(CURLE_OK, $cHandle, $curlHandleToAttributes, $metadata['span']?->get()); // there is no way to get information if it was OK or not without calling curl_multi_info_read
341
+
self::finishMultiSpan(CURLE_OK, $cHandle, $curlHandleToAttributes, $metadata['span']); // there is no way to get information if it was OK or not without calling curl_multi_info_read
343
342
}
344
343
}
345
344
@@ -379,7 +378,7 @@ public static function register(): void
0 commit comments