PHP code example of mantas-done / laravel-apm

1. Go to this page and download the library: Download mantas-done/laravel-apm library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mantas-done / laravel-apm example snippets


Route::get('/apm', '\Done\LaravelAPM\ApmController@index')->name('apm');

return [
    'enabled' => env('APM', true),
    'per_page' => 100, // how many results per page to show
    'sampling' => 1, // logs only part of requests. 1 - 100%, 0.1 - 10% of requests.
    'slow' => 5, // log queries of pages that spent in SQL more than 10 seconds
];

$schedule->call(function () {
    DB::table('recent_users')->delete();
})->daily()->setName('some-name'); // add ->setName()