diff --git a/src/Middlewares/TreblleMiddleware.php b/src/Middlewares/TreblleMiddleware.php index c420e14..20f6b9b 100644 --- a/src/Middlewares/TreblleMiddleware.php +++ b/src/Middlewares/TreblleMiddleware.php @@ -67,7 +67,7 @@ public function terminate(Request $request, JsonResponse|Response|SymfonyRespons } Treblle::log( - endpoint: config('treblle.endpoint', Endpoint::random()), + endpoint: config('treblle.url', Endpoint::random()), data: $this->factory->make( request: $request, response: $response, diff --git a/src/TreblleServiceProvider.php b/src/TreblleServiceProvider.php index 6aab90e..5f51b67 100644 --- a/src/TreblleServiceProvider.php +++ b/src/TreblleServiceProvider.php @@ -7,6 +7,7 @@ use Illuminate\Contracts\Container\BindingResolutionException; use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Events\Dispatcher; +use Illuminate\Foundation\Console\AboutCommand; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; use Illuminate\Support\ServiceProvider; @@ -16,6 +17,8 @@ use Treblle\Commands\SetupCommand; use Treblle\Contracts\TreblleClientContract; use Treblle\Utils\Masking\FieldMasker; +use function config; +use function implode; final class TreblleServiceProvider extends ServiceProvider implements DeferrableProvider { @@ -55,6 +58,17 @@ public function boot(): void Cache::store('octane')->put($uuid, microtime(true)); }); } + + AboutCommand::add( + section: 'Treblle', + data: static fn (): array => [ + 'Version' => Treblle::VERSION, + 'URL' => config('treblle.url'), + 'Project ID' => config('treblle.project_id'), + 'API Key' => config('treblle.api_key'), + 'Ignored Environments' => config('treblle.ignore_environments'), + ], + ); } /**