Installation

Requirements

From the package's composer.json:

  • PHP ^8.4
  • Laravel 11, 12, or 13

1. Install the package

composer require ranetrace/ranetrace-laravel

The service provider and Ranetrace facade alias are auto-discovered.

2. Add your key to your environment

RANETRACE_ENABLED=true
RANETRACE_KEY=your-key-here

Both are required: RANETRACE_ENABLED is the master switch and defaults to false, and RANETRACE_KEY authenticates with the API. Set them wherever Ranetrace should run. That is your production environment; add them to a local .env as well if you want to test the connection during development.

3. Wire up error reporting

Error tracking is on by default, so register Ranetrace on Laravel's exception handler in bootstrap/app.php. Without this line, unhandled exceptions are not captured:

use Illuminate\Foundation\Configuration\Exceptions;
use Ranetrace\Laravel\Facades\Ranetrace;

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

See Error Tracking for what gets captured and how to report manually.

4. Publish the config (optional)

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

This creates config/ranetrace.php. The defaults are usable as-is; publish only if you want to customize buffer sizes, queue names, per-feature timeouts, or the lists of ignored JS errors / excluded log channels / excluded analytics paths.

5. Verify the connection

php artisan ranetrace:status

Status output shows which features are enabled, buffer sizes, and any active pauses.

What's enabled by default

Defaults straight from config/ranetrace.php:

Feature Default
Error Tracking (errors.enabled) On
Event Tracking (events.enabled) On
Centralized Logging (logging.enabled) Off
Website Analytics (website_analytics.enabled) Off
JavaScript Errors (javascript_errors.enabled) Off

Next step

Schedule the worker — without it, buffered data never reaches the API.