irabbi360/laravel-debugmate

Error tracking, log viewing, and performance monitoring SDK for Laravel

Maintainers

Package info

github.com/irabbi360/laravel-debugmate

pkg:composer/irabbi360/laravel-debugmate

Transparency log

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0-beta.2 2026-08-20 09:36 UTC

This package is auto-updated.

Last update: 2026-08-20 09:37:29 UTC


README

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
  • Uptime / SSL / domain monitor registration (checks run on DebugMate)
  • 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('stack', 'Log message', 'info', ['context_data']);

Only channels listed in config/debugmate.php log_channels are streamed when DEBUGMATE_TRACK_LOGS=true.

Uptime / SSL / domain monitors

DebugMate servers run the checks. This package only registers target URLs.

DEBUGMATE_TRACK_MONITORS=true
DEBUGMATE_MONITOR_URLS=https://example.com,https://api.example.com
DEBUGMATE_MONITOR_INCLUDE_APP_URL=true

Register (add to client scheduler daily):

php artisan debugmate:register-monitors --sync

Verify setup

php artisan debugmate:verify

Auth

SDK sends X-DebugMate-Key and Authorization: Bearer {DEBUGMATE_PROJECT_KEY} on every request.

debugmate:verify POSTs /api/debugmate/verify-token so it tests the same auth path as error ingest.

Endpoint Method
/api/debugmate/verify-token GET, POST
/api/debugmate/project GET
/api/debugmate/errors POST
/api/debugmate/metrics POST
/api/debugmate/logs POST
/api/debugmate/queries POST
/api/debugmate/analytics POST
/api/debugmate/monitors 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