diff --git a/src/LaravelOpenTelemetryServiceProvider.php b/src/LaravelOpenTelemetryServiceProvider.php index 4fea579..135ec20 100644 --- a/src/LaravelOpenTelemetryServiceProvider.php +++ b/src/LaravelOpenTelemetryServiceProvider.php @@ -34,11 +34,11 @@ public function register() 'laravel_codecov_opentelemetry' ); - $instance = $this->initOpenTelemetry(); + $inst = $this->initOpenTelemetry(); - if ($instance) { - $this->app->singleton(Tracer::class, function () use ($instance) { - return $instance; + if ($inst) { + $this->app->singleton(Tracer::class, function () use ($inst) { + return $inst; }); } }