laravel-debugmate maintained by irabbi360
Description
Error tracking, log viewing, and performance monitoring SDK for Laravel
Author
Last update
2026/09/09 06:23
(dev-main)
License
Downloads
14
DebugMate SDK
Error tracking, log streaming, and performance monitoring for Laravel apps.
Features
- Error tracking with stack frames and fingerprinting
- Performance monitoring with OpenTelemetry-style spans
- Log streaming
- Request analytics
- Query / job / command / view / HTTP / Livewire collectors
- Async reporting via queues
Installation
composer require irabbi360/laravel-debugmate
Quick Start
1. Environment
DEBUGMATE_ENABLED=true
DEBUGMATE_API_URL=https://your-debugmate-host
DEBUGMATE_PROJECT_KEY=dm_your_project_key
DEBUGMATE_TRACK_ERRORS=true
DEBUGMATE_TRACK_PERFORMANCE=true
Package auto-registers TrackPerformance when DEBUGMATE_TRACK_PERFORMANCE=true (no bootstrap/app.php edit needed).
2. Register exception handler
// bootstrap/app.php
->withExceptions(function (Exceptions $exceptions) {
\Irabbi360\LaravelDebugMate\Services\ExceptionHandler::handles($exceptions);
})->create();
3. Manual reporting
use Irabbi360\LaravelDebugMate\Facades\DebugMate;
try {
// Your code
} catch (Exception $e) {
DebugMate::reportError($e, [
'user_id' => auth()->id(),
'route' => request()->path(),
]);
}
Performance monitoring
use Irabbi360\LaravelDebugMate\Facades\DebugMate;
DebugMate::startMonitoring('database_query');
// ... your code ...
DebugMate::stopMonitoring('database_query', ['query' => 'SELECT...']);
Logs
use Irabbi360\LaravelDebugMate\Facades\DebugMate;
DebugMate::log('Channel', 'Log message', 'info', ['context_data']);
Auth
SDK sends X-DebugMate-Key: {DEBUGMATE_PROJECT_KEY} on every request.
| Endpoint | Method |
|---|---|
/api/debugmate/verify-token |
GET |
/api/debugmate/project |
GET |
/api/debugmate/errors |
POST |
/api/debugmate/metrics |
POST |
/api/debugmate/logs |
POST |
/api/debugmate/queries |
POST |
/api/debugmate/analytics |
POST |
Configuration
Publish config (optional):
php artisan vendor:publish --tag=config --provider="Irabbi360\LaravelDebugMate\DebugMateServiceProvider"
Key env vars: DEBUGMATE_ENABLED, DEBUGMATE_API_URL, DEBUGMATE_PROJECT_KEY, DEBUGMATE_TRACK_*, DEBUGMATE_ASYNC_REPORTING.
Testing
composer install
composer test
License
MIT — see LICENSE.md