laravel-discord-error-tracker
Track Your Errors using Discord Webhook on any Laravel App
composer require tomatophp/laravel-discord-error-tracker- discord
- discord-error
- error-handling
- error-reporting
- integration
- laravel
اقرأني
![]()
Laravel Discord Error Tracker
Track Your Errors using Discord Webhook on any Laravel App
Compatibility
| Version | Laravel | PHP | Branch |
|---|---|---|---|
| 2.x | 12.x, 13.x | 8.2+ | master |
| 1.x | 10.x, 11.x | 8.1+ | v1 |
Installation
Add these to your .env:
Nothing is sent while DISCORD_ERROR_WEBHOOK_ACTIVE is false or DISCORD_ERROR_WEBHOOK is empty.
How reporting works
Laravel 11+ apps have no app/Exceptions/Handler.php. The package's service provider (auto-discovered) registers a
reportable callback on the application's exception handler, so every exception Laravel reports (the ones that pass
dontReport / $exceptions->dontReport()) is sent to Discord. No change to bootstrap/app.php is needed, and Laravel's
own logging keeps running.
The message is sent by the queued NotifyDiscordJob on your default queue connection (3 tries, 10 seconds backoff).
With QUEUE_CONNECTION=sync it is sent during the request; otherwise run a queue worker.
A failing or unreachable webhook never breaks your app, and webhook failures (DiscordWebhookException) are never
reported back to Discord, so there is no report loop.
If you prefer wiring it by hand, set DISCORD_ERROR_AUTO_REPORT=false and add it in bootstrap/app.php
(calling it with auto-report on is harmless: the callback is only registered once):
To report a single exception yourself:
The payload respects Discord limits (title 256, description 4096, 25 fields, field value 1024, 6000 characters per embed); long stack traces are truncated.
Publish Assets
you can publish config file by use this command
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security
Please see SECURITY for more information about security.
Credits
License
The MIT License (MIT). Please see License File for more information.
Testing
if you like to run PEST testing just use this command
Code Style
if you like to fix the code style just use this command
PHPStan
if you like to check the code by PHPStan just use this command
Other Filament Packages
Checkout our Awesome TomatoPHP