Error tracking is on by default (errors.enabled = true). Once the package is installed and the worker is scheduled, exceptions captured by Laravel's reporter are sent to Ranetrace.
The Ranetrace facade exposes a handles() method that's wired to Laravel's exception handler. Internally, anything that flows through report() (including unhandled exceptions Laravel catches) ends up at Ranetrace::report($exception).
From Ranetrace\Laravel\Ranetrace::report():
cookie, authorization, x-csrf-token, x-xsrf-token.argv.use Ranetrace\Laravel\Facades\Ranetrace;
Ranetrace::report($exception);
report() takes a single Throwable argument — there is no second context parameter.
You can also call Laravel's built-in report() helper; it routes through the same handler:
try {
$this->thirdPartyApi->sync();
} catch (Throwable $exception) {
report($exception);
}
php artisan ranetrace:test-errors
From config/ranetrace.php:
'errors' => [
'enabled' => env('RANETRACE_ERRORS_ENABLED', true),
'queue' => env('RANETRACE_ERRORS_QUEUE', true),
'queue_name' => env('RANETRACE_ERRORS_QUEUE_NAME', 'default'),
'timeout' => env('RANETRACE_ERRORS_TIMEOUT', 10),
],
To disable without uninstalling:
RANETRACE_ERRORS_ENABLED=false