PHP code example of justbetter / magento2-inspectorapm

1. Go to this page and download the library: Download justbetter/magento2-inspectorapm 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/ */

    

justbetter / magento2-inspectorapm example snippets



return [
    ...
    'inspector_apm' => [
        'ingestion_key' => $_ENV['INSPECTOR_INGESTION_KEY'] ?? '...',
        // Optional, default: https://ingest.inspector.dev
        'url' => $_ENV['INSPECTOR_URL'] ?? 'https://ingest.inspector.dev',
    ],
    ...
]


return [
    ...
    'inspector_apm' => [
        'ingestion_key' => $_ENV['INSPECTOR_INGESTION_KEY'] ?? 'anything-as-its-not-used',
        'url' => $_ENV['INSPECTOR_URL'] ?? 'http://[email protected]:8000',
    ],
    ...
]


return [
    ...
    'db' => [
        'connection' => [
            'default' => [
                ...
                'profiler' => [
                    'class' => 'JustBetter\\InspectorApm\\Profiler\\Driver\\DbProfiler',
                    'enabled' => true
                ]
            ]
        ]
    ],
    ...