A debugging and observability package for Laravel applications. Probe records requests, exceptions, queries, jobs, cache operations, and scheduled tasks — then surfaces them in a real-time dashboard.
Dashboard screenshot — coming soon
- PHP 8.2+
- Laravel 10, 11, or 12
composer require morcen/probeRun the install command to publish the config and migrate:
php artisan probe:installOr publish assets manually:
php artisan vendor:publish --tag=probe-config
php artisan vendor:publish --tag=probe-migrations
php artisan migrateVisit /probe in your browser. By default, access is restricted to local environments. To customize authorization, add the following to your AppServiceProvider:
use Morcen\Probe\Probe;
Probe::auth(function ($request) {
return $request->user()?->isAdmin();
});You can change the dashboard path via the PROBE_PATH env variable or the config file.
Probe ships with six watchers. Toggle them in config/probe.php or via environment variables:
| Watcher | Env Variable | Default |
|---|---|---|
| Requests | PROBE_WATCHER_REQUESTS |
true |
| Exceptions | PROBE_WATCHER_EXCEPTIONS |
true |
| Jobs | PROBE_WATCHER_JOBS |
true |
| Queries | PROBE_WATCHER_QUERIES |
true |
| Cache | PROBE_WATCHER_CACHE |
false |
| Schedule | PROBE_WATCHER_SCHEDULE |
true |
The query watcher automatically tags slow queries and detects N+1 patterns:
PROBE_SLOW_QUERY_MS=100 # queries over this threshold are tagged "slow"
PROBE_N1_THRESHOLD=5 # same query fingerprint N times = tagged "n1"Probe fires notifications when entries match a rule. Configure rules in config/probe.php:
'alerts' => [
['types' => ['exceptions'], 'channel' => 'slack', 'url' => env('PROBE_SLACK_WEBHOOK')],
['types' => ['jobs'], 'tags' => ['failed'], 'channel' => 'webhook', 'url' => env('PROBE_WEBHOOK_URL')],
['types' => ['queries'], 'tags' => ['slow'], 'channel' => 'log'],
],Supported channels: slack, webhook, log.
Schedule the prune command to keep your database clean:
// routes/console.php
Schedule::command('probe:prune')->daily();Pruning TTLs are configurable per entry type:
PROBE_PRUNE_REQUESTS=7
PROBE_PRUNE_EXCEPTIONS=30
PROBE_PRUNE_JOBS=7
PROBE_PRUNE_QUERIES=3
PROBE_PRUNE_CACHE=1
PROBE_PRUNE_SCHEDULE=7To clear all entries immediately:
php artisan probe:clearFor high-traffic production environments, record a fraction of entries:
PROBE_SAMPLING_RATE=0.1 # record 10% of entriesProbe supports Laravel Octane. Per-request state resets automatically between requests.
Publish and review config/probe.php for all options. Key environment variables:
| Variable | Default | Description |
|---|---|---|
PROBE_ENABLED |
true |
Enable or disable Probe entirely |
PROBE_PATH |
probe |
Dashboard URI path |
PROBE_STORAGE_DRIVER |
database |
Storage backend |
PROBE_SAMPLING_RATE |
1.0 |
Fraction of entries to record |
Contributions are welcome. Please follow these steps:
- Fork the repository.
- Create a branch:
git checkout -b feature/your-feature. - Write tests for your changes.
- Run the test suite:
./vendor/bin/pest. - Open a pull request against
main.
Please keep pull requests focused. One feature or fix per PR. Open an issue first for large changes so we can align on direction before you invest time writing code.
composer install
./vendor/bin/pestProbe is open-sourced software licensed under the MIT license.