Configuration
Customize the monitoring strategy in your Laravel application.
If you want full control of the package behaviour publish the configuration file:
This comand will create the config/inspector.php
file.
Environment Variables
You can use the following environment variables to determine how Inspector will collect information for your application:
Variable
Type
Default
Description
INSPECTOR_API_KEY
string
Your application key to identify uniquely your application in Inspector.
INSPECTOR_ENABLE
boolean
true
Enable/Disable data transfer from your app to Inspection API.
INSPECTOR_TRANSPORT
string
async
Tha way the package sends data to the inspection API. sync
(using php curl extension), async
(in a background process)
INSPECTOR_MAX_ITEMS
integer
100
Max numebr of items recorded during an execution cycle.
INSPECTOR_QUERY
boolean
true
Determine if Inspector should report database queries.
INSPECTOR_QUERY_BINDINGS
boolean
false
Determine if Inspector should report binding values for queries.
INSPECTOR_USER
boolean
true
Determine if Inspector should attach user information in your events.
INSPECTOR_EMAIL
boolean
true
Determine if Inspector should report emails.
INSPECTOR_NOTIFICATIONS
boolean
true
Determine if Inspector should report notifications.
INSPECTOR_JOB
boolean
true
Determine if Inspector should report queued jobs execution.
INSPECTOR_VIEWS
boolean
true
Determine if Inspector should report views rendering stats.
INSPECTOR_UNHANDLED_EXCEPTIONS
boolean
true
Determine if Inspector should report unhandled exception fired in your application.
INSPECTOR_REDIS
boolean
true
Determine if Inspector should report redis command.
INSPECTOR_HTTP_CLIENT
boolean
true
Determine if Inspector should report Http requests done using the Laravel Http Client
INSPECTOR_HTTP_CLIENT_BODY
boolean
false
Determine if Inspector should report Http client response body
Master Switch
If desired, you may disable data transfer setting to false
the enable
configuration option:
Ignore Urls, Commands, Jobs
Not all transactions need to be monitored in your application. Think about a Laravel Nova admin panel, that is built for internal use and aren't reachable by users. Or the Livewire internal HTTP requests that arent related to your business logic.
You have many options to keep off the noise, and only monitor what metter.
To add these customizations you need to publish the inspector.php
configuration file. You can do it with the command below:
php artisan vendor:publish --provider="Inspector\Laravel\InspectorServiceProvider"
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.
Ignore Commands
You can ignore artisan commands adding the command signature to the ignore_commands
parameter in the config/inspector.php
configuration file.
Ignore Jobs
You can also ignore background jobs adding classes to the ignore_jobs
property:
Last updated