Skip to content

Commit e44f4e4

Browse files
PROFeNoMbwoebi
andcommitted
perf: Class lookup optimization
Co-authored-by: Bob Weinand <[email protected]>
1 parent 1c14c3b commit e44f4e4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/DDTrace/OpenTelemetry/Context.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ public static function setStorage(ContextStorageInterface $storage): void
6262
public static function storage(): ContextStorageInterface
6363
{
6464
if (self::$storageClass === '') {
65-
self::$storageClass = class_exists('\OpenTelemetry\Context\FiberBoundContextStorageExecutionAwareBC')
66-
? '\OpenTelemetry\Context\FiberBoundContextStorageExecutionAwareBC' // v1.1+
67-
: '\OpenTelemetry\Context\ContextStorage';
65+
self::$storageClass = class_exists('OpenTelemetry\Context\FiberBoundContextStorageExecutionAwareBC')
66+
? 'OpenTelemetry\Context\FiberBoundContextStorageExecutionAwareBC' // v1.1+
67+
: 'OpenTelemetry\Context\ContextStorage';
6868
}
6969

7070
return self::$storage ??= new self::$storageClass();

0 commit comments

Comments
 (0)