Download the PHP package ibrahim-kaya/error-tracker without Composer
On this page you can find all versions of the php package ibrahim-kaya/error-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ibrahim-kaya/error-tracker
More information about ibrahim-kaya/error-tracker
Files in ibrahim-kaya/error-tracker
Package error-tracker
Short Description A Laravel package to automatically track, deduplicate, and manage unhandled exceptions with full HTTP context and statistics.
License MIT
Informations about the package error-tracker
Laravel Error Tracker
Turkish documentation: README.tr.md
A professional Laravel package that automatically captures, deduplicates, and stores all unhandled exceptions to the database — giving you a persistent, queryable history of every error your application encounters.
Features
- Zero-configuration capture — automatically intercepts all unhandled exceptions via Laravel's
reportable()hook. No changes toHandler.phporbootstrap/app.phprequired. - Smart deduplication — identical errors (same class + message + file + line) are grouped into a single record. Only the occurrence count and last-seen timestamp update on repeat occurrences.
- Manual capture — catch blocks can report exceptions with one line using the
ErrorTracker::capture()facade or Laravel's built-inreport()helper. - Per-call severity override — override the severity level for a specific capture call:
ErrorTracker::capture($e, ['severity' => 'critical']). - Full HTTP context — stores the URL, HTTP method, client IP, user agent, authenticated user ID, sanitized request input, and selected headers alongside each error.
- CLI & queue support — exceptions from Artisan commands and queued jobs are captured with null HTTP fields.
- PSR-3 severity levels — configurable severity mapping by exception class (debug → emergency).
- Status lifecycle — triage errors as
open,resolved, orignoreddirectly on the model. - Rich statistics — 10+ static methods on the
ErrorLogmodel for building dashboards and reports. - Artisan commands —
error-tracker:statsanderror-tracker:clearfor CLI management. - Async queue support — writes can be dispatched asynchronously to keep response times fast.
- Rate limiting — prevents the same error from flooding the queue during bursts. Each unique fingerprint is throttled to a configurable number of dispatches per time window using the Laravel cache.
- Privacy first — configurable field exclusion (passwords, tokens, payment data) and a header whitelist.
- Laravel 9 / 10 / 11 / 12 compatible.
Requirements
| Dependency | Version |
|---|---|
| PHP | >= 8.0 |
| Laravel | 9, 10, 11, or 12 |
Installation
1. Install via Composer
2. Run the migration
3. (Optional) Publish the configuration file
This copies the config file to config/error-tracker.php where you can customize it.
The package works out of the box without publishing the config — sensible defaults are applied automatically.
Configuration
After publishing the config, open config/error-tracker.php:
Environment Variables
| Key | Default | Description |
|---|---|---|
ERROR_TRACKER_ENABLED |
true |
Enable or disable tracking |
ERROR_TRACKER_QUEUE |
true |
Use queue for async writes |
ERROR_TRACKER_QUEUE_NAME |
default |
Queue name for jobs |
Usage
Automatic Capture
Once installed, nothing extra is needed. All unhandled exceptions are automatically intercepted and stored. The package registers a reportable() callback through the ServiceProvider — your existing Handler.php or bootstrap/app.php is never modified.
Manual Capture from Try-Catch Blocks
Option A — ErrorTracker Facade
Option B — Per-call Severity Override
Option C — Laravel's Built-in report() Helper
Laravel's report() helper also triggers the package's reportable() callback:
Querying Errors
Use the ErrorLog Eloquent model directly:
Status Management
Statistics
All statistics are available as static methods on the ErrorLog model:
Artisan Commands
View Statistics
Example output:
Clear Error Logs
Options:
| Option | Default | Description |
|---|---|---|
--status |
(all) | Filter by status: open, resolved, or ignored |
--older-than |
0 |
Only delete records last seen more than N days ago |
--force |
false |
Skip the confirmation prompt |
Laravel Compatibility
| Laravel | PHP | Supported |
|---|---|---|
| 9.x | 8.0, 8.1 | ✅ |
| 10.x | 8.1, 8.2 | ✅ |
| 11.x | 8.2, 8.3 | ✅ |
| 12.x | 8.2, 8.3, 8.4 | ✅ |
The package uses ExceptionHandler::reportable(), which has been available since Laravel 8 and works identically across all supported versions — including Laravel 11+'s new bootstrap/app.php skeleton.
Security & Privacy
What is stored
| Field | Description |
|---|---|
| Exception class | The PHP class name of the exception |
| Message | The exception message text |
| File & line | Where in the codebase the exception occurred |
| Stack trace | Function call chain (arguments excluded) |
| URL, method | The request URL and HTTP verb |
| IP address | Client IP, supports IPv6 |
| User agent | Browser string |
| User ID | Authenticated user's ID (cast to string) |
| Request input | Sanitized — sensitive fields stripped |
| Headers | Only whitelisted headers when enabled |
What is never stored
- Raw passwords or any field listed in
excluded_input_fields Authorizationheaders, cookies, or session data- Stack frame arguments (can contain models, closures, or large objects)
- File upload objects
Rate Limiting
Rate limiting prevents the same error from flooding the queue and database when it fires thousands of times per second (e.g. an exception inside a loop).
How it works:
Each unique fingerprint is tracked in the Laravel cache. Once it is captured more than max_attempts times within decay_seconds, further dispatches are silently dropped until the window resets. The error group is still correctly recorded — only excess job dispatches are suppressed.
Note: Rate limiting requires a cache driver that supports atomic increments (Redis, Memcached, or the database driver). If the cache driver is unavailable, the check fails open — captures are never dropped due to a cache failure.
Excluding sensitive exception types
Add exception classes to the excluded_exceptions config key to prevent them from being tracked:
Disabling tracking per environment
Contributing
Contributions, issues, and feature requests are welcome. Please open an issue first to discuss what you would like to change.
License
This package is open-sourced software licensed under the MIT license.
Author: İbrahim Kaya
All versions of error-tracker with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/queue Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^9.0|^10.0|^11.0|^12.0|^13.0