Skip to content

Commit

Permalink
fixing property type coercion
Browse files Browse the repository at this point in the history
  • Loading branch information
Przemek Delewski committed Nov 17, 2022
1 parent c033554 commit 00374ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Instrumentation/Psr15/src/Psr15Instrumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use OpenTelemetry\API\Trace\SpanKind;
use OpenTelemetry\API\Trace\StatusCode;
use OpenTelemetry\Context\Context;
use OpenTelemetry\Context\ContextKey;
use function OpenTelemetry\Instrumentation\hook;
use OpenTelemetry\SemConv\TraceAttributes;
use Psr\Http\Message\ResponseInterface;
Expand All @@ -24,12 +23,11 @@
*/
class Psr15Instrumentation
{
public static ContextKey $rootSpan;
public static $rootSpan;

public static function register(): void
{
$instrumentation = new CachedInstrumentation('io.opentelemetry.contrib.php.psr15');

/**
* Create a span for each psr-15 middleware that is executed.
*/
Expand Down Expand Up @@ -126,4 +124,4 @@ public static function register(): void
}
}

Psr15Instrumentation::$rootSpan = Context::createKey('rootSpan');
Psr15Instrumentation::$rootSpan ??= Context::createKey('rootSpan');

0 comments on commit 00374ad

Please sign in to comment.