Monitor the performance of PHP Laravel applications with Scout's PHP APM Agent. Detailed performance metrics and transaction traces are collected once the scout-apm package is installed and configured.
- PHP Version: PHP 7.0+
- Laravel Version: 5.5+
A Scout account is required. Signup for Scout.
composer require scoutapp/scoutapm-laravel
In your .env
file, make sure you set a few configuration variables:
SCOUT_KEY=ABC0ZABCDEFGHIJKLMNOP
SCOUT_NAME="My Laravel App"
SCOUT_MONITOR=true
Your key can be found in the Scout Org settings page.
For full installation and troubleshooting documentation, visit our help site.
Please contact us at support@scoutapm.com or create an issue in this repo.
$request = new ServiceRequest();
$request->setApiVersion($version);
Turns into:
// At top, with other imports
use ScoutApm;
// Replacing the above code
$request = ScoutApm::instrument(
"Custom", "Building Service Request",
function ($span) use ($version) {
$request = new ServiceRequest();
$request->setApiVersion($version);
return $request;
}
);