diff --git a/src/LaravelTelemetryServiceProvider.php b/src/LaravelTelemetryServiceProvider.php index 5fd2344..61032d1 100644 --- a/src/LaravelTelemetryServiceProvider.php +++ b/src/LaravelTelemetryServiceProvider.php @@ -66,8 +66,10 @@ public function boot(): void }); $this->app->terminating(function () { - if ($this->app->make(Repository::class)->get('telemetry.sdk.disabled')) { - return; + if ($this->app->resolved(LoggerProviderSdkInterface::class)) { + /** @var LoggerProviderSdkInterface $logger */ + $logger = $this->app->get(LoggerProviderSdkInterface::class); + $logger->shutdown(); } if ($this->app->resolved(MeterProviderSdkInterface::class)) {