ErrTapDOCS

Laravel SDK

Install errtap/laravel via Composer, configure your DSN, auto-report exceptions, send cron heartbeats, and suppress noise from your Laravel application.

Install

composer require errtap/laravel

Publish config

php artisan vendor:publish --tag=errtap-config

This creates config/errtap.php.

Environment variables

ERRTAP_DSN=https://et_<key>@your-host
ERRTAP_ENVIRONMENT=production
ERRTAP_RELEASE=1.4.3

Exception reporting

In app/Exceptions/Handler.php (Laravel 10 and below) or bootstrap/app.php (Laravel 11+), register the ErrTap handler:

Laravel 11+ (bootstrap/app.php):

->withExceptions(function (Exceptions $exceptions) {
    ErrTap::handles($exceptions);
})

Laravel 10 and below (app/Exceptions/Handler.php):

use Errtap\Laravel\Facades\ErrTap;

public function register(): void
{
    $this->reportable(function (Throwable $e) {
        ErrTap::captureException($e);
    });
}

Cron heartbeats

After each successful scheduled job, call ErrTap::heartbeat($slug) to check in:

use Errtap\Laravel\Facades\ErrTap;

protected function schedule(Schedule $schedule): void
{
    $schedule->command('invoices:generate')
        ->daily()
        ->onSuccess(function () {
            ErrTap::heartbeat('invoices-generate');
        });
}

Create a matching cron monitor in the ErrTap dashboard so you get alerted when a heartbeat is missed.

Artisan command

php artisan errtap:test

Sends a test error to verify your DSN is wired correctly.

Middleware (user context)

Register the SetErrTapUser middleware to attach the authenticated user to every reported error:

// app/Http/Kernel.php (Laravel 10-)
protected $middleware = [
    \Errtap\Laravel\Http\Middleware\SetErrTapUser::class,
];

Ignore exceptions

Add exception classes you do not want reported:

// config/errtap.php
'ignore_exceptions' => [
    \Illuminate\Auth\AuthenticationException::class,
    \Illuminate\Validation\ValidationException::class,
],

Release & environment

ERRTAP_ENVIRONMENT=production
ERRTAP_RELEASE=1.4.3

Or set them programmatically at boot:

ErrTap::configure([
    'release'     => config('app.version'),
    'environment' => app()->environment(),
]);

ErrTap uses release for regression detection — resolved issues re-open automatically if they reappear in a newer release.