Using Composer/Packagist
composer install laravel-datadog-batched
return [
'providers' => [
MikeGarde\LaravelDataDogBatched\DataDogServiceProvider::class,
],
'aliases' => [
'DataDog' => MikeGarde\LaravelDataDogBatched\DataDogFacade::class,
],
];
protected $middleware = [
\MikeGarde\LaravelDataDogBatched\DataDogMiddleware::class,
];
php artisan vendor:publish --provider="MikeGarde\LaravelDataDogBatched\DataDogServiceProvider"
Review the config and name the prefix
appropriately
Tip: enable or disable based on environment
return [
'enabled' => (env('APP_ENV') === 'prod' || env('APP_ENV') === 'qa'),
'prefix' => 'app.APIv2',
];
If desired to log SQL interactions and duration
return [
'logger' => \MikeGarde\LaravelDataDogBatched\FileLogger::class,
];