Laravel Configuration

Configuration

Environment Variables

You can use the following environment variables to determine how Palzin Monitor will collect information for your application:

Variable Type Default Description
PALZIN_APM_API_KEY string Your application key to identify uniquely your application in Palzin.
PALZIN_APM_ENABLE boolean true Enable/Disable data transfer from your app to Inspection API.
PALZIN_APM_TRANSPORT string async Tha way the package sends data to the inspection API. sync (using php curl extension), async (in a background process)
PALZIN_APM_MAX_ITEMS integer 100 Max numebr of items recorded during an execution cycle.
PALZIN_APM_QUERY boolean true Determine if Palzin Monitor should report database queries.
PALZIN_APM_QUERY_BINDINGS boolean false Determine if Palzin Monitor should report binding values for queries.
PALZIN_APM_USER boolean true Determine if Palzin Monitor should attach user information in your events.
PALZIN_APM_EMAIL boolean true Determine if Palzin Monitor should report emails.
PALZIN_APM_NOTIFICATIONS boolean true Determine if Palzin Monitor should report notifications.
PALZIN_APM_JOB boolean true Determine if Palzin Monitor should report queued jobs execution.
PALZIN_APM_VIEWS boolean true Determine if Palzin Monitor should report views rendering stats.
PALZIN_APM_UNHANDLED_EXCEPTIONS boolean true Determine if Palzin Monitor should report unhandled exception fired in your application.
PALZIN_APM_REDIS boolean true Determine if Palzin Monitor should report redis command.

If you want full control of the package behaviour publish the configuration file:

php artisan vendor:publish --provider="Palzin\Laravel\PalzinServiceProvider"

That will add config/ultimate.php file in your Laravel configuration directory.

Master Switch

If desired, you may disable data transfer setting to false the enable configuration option:

'enable' => env('PALZIN_APM_ENABLE', true),

Ignore transactions (urls, commands, jobs)

Not all transactions need to be monitored in your application. Think about the artisan commands used for application maintainance or deployment, like: migrate:xxx, queue:xxx , horizon:xxx, or other parts of your app that is built for internal use and aren't reachable by users.

You have many options to keep off the noise, and only monitor what metter.

To add these customizations you need to publish the ultimate.php configuration file if you haven't already: php artisan vendor:publish --provider="Palzin\Laravel\PalzinServiceProvider"

Ignore URLs

It could be needed to turn off monitoring based on url. Think about paths like /nova, /telescope, or other parts of your app that don't affect the user experience.

You can also use the wildcard character * to exclude all sub-paths.

/*
 |---------------------------------------------------------------------
 | Web request url to ignore
 |---------------------------------------------------------------------
 |
 | Add at this list the url schemes that you don't want monitoring
 | in your Palzin Monitor dashboard. You can also use wildcard expression (*).
 |
 */
 
'ignore_url' => [
    'telescope*',
    'vendor/telescope*',
    'horizon*',
    'vendor/horizon*',
],

Ignore Commands

You can ignore artisan commands adding the command signature to the ignore_commands parameter in the config/ultimate.php configuration file.

/*
 |---------------------------------------------------------------------
 | Artisan command to ignore
 |---------------------------------------------------------------------
 |
 | Add at this list all command signature that you don't want monitoring
 | in your Palzin Monitor dashboard.
 |
 */
 
'ignore_commands' => [
    'migrate:rollback',
    'migrate:fresh',
    'migrate:reset',
    'migrate:install',
    'package:discover',
    'queue:listen',
    'queue:work',
    'horizon',
    'horizon:work',
    'horizon:supervisor',
],

Ignore Jobs

You can also ignore background jobs adding classes to the ignore_jobs property:

/*
|--------------------------------------------------------------------------
| Job classes to ignore
|--------------------------------------------------------------------------
|
| Add at this list the job classes that you don't want monitor.
|
*/

'ignore_jobs' => [
    //\App\Jobs\MyJob::class
],
Last updated: 8 months ago

Want to get started with Palzin Monitor? We offer a no-strings-attached
15 days trial. No credit card required.

It takes less than a minutes to setup your first monitoring.