timadey/trailscope

Laravel request tracing and user journey observability with step logging, dashboard insights, and database or Redis storage.

Maintainers

Package info

github.com/Timadey/trailscope

pkg:composer/timadey/trailscope

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-06-06 23:16 UTC

This package is not auto-updated.

Last update: 2026-06-07 08:52:29 UTC


README

TrailScope logo

TrailScope

TrailScope is a Laravel request tracing and user journey observability package with step logging, dashboard insights, and database or Redis storage.

Install

composer require timadey/trailscope
php artisan vendor:publish --tag=trail-config
php artisan vendor:publish --tag=trail-migrations
php artisan migrate
php artisan trail:user admin@example.com --name="Admin" --role=admin

Capture Requests

Add the middleware to routes that should be traced:

Route::middleware('trail')->group(function () {
    Route::post('/transfer', TransferController::class);
});

Exclude noisy paths in config/trail.php:

'capture' => [
    'except_paths' => ['health', 'up', 'horizon/*'],
],

Add Developer Steps

step('charging wallet', $wallet, $amount, $response);

For the clearest context keys, use named arguments or an associative array:

step('checking network', product: $product, is_active: $is_active);
step('checking network', ['product' => $product, 'is_active' => $is_active]);

TrailScope also infers simple positional variable names, so step('checking network', $product, $is_active) is stored as product and is_active when possible. Complex expressions fall back to generated keys.

TrailScope automatically attaches the step to the active request trace, normalizes context, sanitizes sensitive data, resolves identity, and stores the trace through the configured driver.

Storage

The default storage driver is the host database. Redis is also available:

TRAIL_STORAGE_DRIVER=redis
TRAIL_REDIS_CONNECTION=default
TRAIL_REDIS_PREFIX=trail
TRAIL_REDIS_TTL_DAYS=90