Error monitoring for Laravel.

With sentry/sentry-laravel, your Laravel app reports exceptions to Fehlo. You need one Composer package, one Artisan command and one line in bootstrap/app.php.

As of 21 October 2026, sentry/sentry-laravel 4.29.0, Laravel 11 and later.

1. Install the package and set the DSN

Terminal
composer require sentry/sentry-laravel
php artisan sentry:publish --dsn=https://<key>@app.fehlo.de/<project-id>

sentry:publish creates config/sentry.php and writes the DSN to your .env. For several environments, set the values there:

.env
SENTRY_LARAVEL_DSN=https://<key>@app.fehlo.de/<project-id>
SENTRY_ENVIRONMENT=production
SENTRY_RELEASE=my-app@1.0.0

2. Report exceptions to Fehlo

Since Laravel 11 you register the package in bootstrap/app.php:

bootstrap/app.php
<?php

use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Sentry\Laravel\Integration;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        //
    })
    ->withExceptions(function (Exceptions $exceptions) {
        Integration::handles($exceptions);
    })
    ->create();

3. Test it

Terminal
php artisan sentry:test

The command sends a test event to the configured DSN. Or add a route that throws:

routes/web.php
Route::get('/debug-fehlo', function () {
    throw new Exception('Fehlo test error');
});

Privacy

The Laravel SDK only sends IP addresses and user data when SENTRY_SEND_DEFAULT_PII is true; the default is false. Leave it that way unless you need the users. For arguments in stack traces Sentry recommends zend.exception_ignore_args = Off in php.ini. Argument values then end up in events too; Fehlo filters passwords and tokens out on the server.

Measure performance

.env
SENTRY_TRACES_SAMPLE_RATE=0.2

It is off by default. Each measured request is a transaction and counts against your plan's transaction allowance, not against your events.

Questions

Nothing arrives. What should I check?

First the DSN: it has to point at app.fehlo.de. Second, whether your server or browser can reach https://app.fehlo.de (firewall, proxy, ad blocker). Third, whether this month's quota is used up; you get an email when it is. Fourth, whether sampleRate or beforeSend drops events. If only performance data is missing, this month's transactions may be used up.