PHP code example of topshelfcraft / new-relic

1. Go to this page and download the library: Download topshelfcraft/new-relic 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/ */

    

topshelfcraft / new-relic example snippets



return [

    /*
     * Specify a different app name than
     * the one provided in your .ini files,
     * e.g. If you want to change the app name
     * on a per-environment basis...
     */
    'appName' => '',
    
    /*
     * Specify a string to override Segment 2
     * from the request path, e.g. If you want to
     * consolidate your reported routes...
     */
    'groupSegment2As' => '',

];


return [
    // ...
    
    'disabledPlugins' => [
        'new-relic',
    ],
    
    // ...
];

Yii:$app->request->setIsConsoleRequest(Yii:$app->request instanceof yii/console/Request);