shantotonni / pm-error-monitor
Auto error/exception monitoring reporter for Laravel projects
v1.1.0
2026-04-28 13:53 UTC
Requires
- php: >=7.4
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
This package is auto-updated.
Last update: 2026-04-28 13:54:00 UTC
README
Automatically captures and reports Laravel exceptions to a central Project Management dashboard.
What it does
- Hooks into Laravel's exception handler automatically
- Sends error details (message, file, line, stack trace, request data) to PM dashboard
- Groups duplicate errors (no spam)
- Auto-creates emergency tasks for critical errors
- Notifies assigned developers
Requirements
- PHP >= 7.4
- Laravel 8, 9, 10, or 11
Installation
Step 1 — Add repository to composer.json
"repositories": [ { "type": "vcs", "url": "https://github.com/shantotonni/pm-error-monitor" } ]
Step 2 — Require the package
composer require shantotonni/pm-error-monitor
Step 3 — Run the installer
php artisan pm-monitor:install --project-id=YOUR_PROJECT_ID --token=YOUR_API_TOKEN --env=production
Get project-id and token from:
Project Management → Projects → Manage → API Keys → Error Monitor
Step 4 — Clear config and test
php artisan config:clear php artisan pm-monitor:test
What the installer does automatically
| Action | File |
|---|---|
Adds PM_MONITOR_* variables |
.env |
Injects PmMonitorHandler::report() |
app/Exceptions/Handler.php |
| Publishes config | config/pm-monitor.php |
Manual .env variables (if needed)
PM_MONITOR_URL=http://YOUR-PM-SERVER/api/monitoring/errors PM_MONITOR_PROJECT_ID=1 PM_MONITOR_TOKEN=your_token_here PM_MONITOR_ENV=production PM_MONITOR_ENABLED=true PM_MONITOR_TIMEOUT=3
Manual Handler.php snippet (if auto-patch fails)
Inside app/Exceptions/Handler.php → register() method:
public function register(): void { $this->reportable(function (\Throwable $e) { \PmMonitor\PmMonitorHandler::report($e); }); }
Artisan commands
| Command | Description |
|---|---|
php artisan pm-monitor:install |
Full auto-setup (.env + Handler.php patch) |
php artisan pm-monitor:test |
Send test error to verify connection |
Severity auto-detection
| Condition | Severity |
|---|---|
| DB / connection exception | critical |
| Keywords: payment, transaction, deploy, database | critical |
| HTTP 5xx | high |
| HTTP 4xx | low |
| Everything else | medium |
Uninstall
- Remove
shantotonni/pm-error-monitorfromcomposer.json - Run
composer update - Remove
PM_MONITOR_*lines from.env - Remove
PmMonitorHandler::report($e)fromHandler.php