bliptrace/laravel hooks into Laravel’s exception handler and reports unhandled exceptions after the response is sent, so a slow network never slows a request. It is a thin layer over bliptrace/php.
| Package | bliptrace/laravel on Packagist, ^1.2 |
| Config | config/bliptrace.php, read with config('bliptrace') |
| Source | github.com/bliptrace/bliptrace-laravel |
Building on the Kickoff template? The SDK is already installed and has a settings page. See Kickoff apps.
Install
composer require bliptrace/laravel:^1.2
php artisan vendor:publish --tag="bliptrace-config"
Configure
BLIPTRACE_KEY=blip_your_key_here
BLIPTRACE_ENDPOINT=https://ingest.bliptrace.com
BLIPTRACE_RELEASE=[email protected]
# BLIPTRACE_ENABLED=false # master kill switch
# BLIPTRACE_SAMPLE_RATE=1.0 # share of events sent, 0.0–1.0
That is all. Run php artisan config:clear if your config is cached.
| Variable | Default | What it does |
|---|---|---|
BLIPTRACE_KEY |
none | Ingest key. Nothing is sent without it |
BLIPTRACE_ENDPOINT |
legacy host | Set to https://ingest.bliptrace.com |
BLIPTRACE_ENVIRONMENT |
APP_ENV |
Environment label |
BLIPTRACE_RELEASE |
none | Version or commit SHA |
BLIPTRACE_ENABLED |
true |
Turn capture off without removing the package |
BLIPTRACE_SAMPLE_RATE |
1.0 |
Client-side share of events sent, chosen at random per event |
BLIPTRACE_TIMEOUT |
3 |
Seconds for the send |
BLIPTRACE_MAX_RETRIES |
2 |
Retries when the ingest is briefly down or answers 429 |
BLIPTRACE_RETRY_BASE_MS / BLIPTRACE_RETRY_CAP_MS |
100 / 2000 |
Backoff with jitter between retries |
BLIPTRACE_MAX_FRAMES |
30 |
Stack frames sent |
BLIPTRACE_MAX_MESSAGE |
2000 |
Characters of the message |
Retries are safe: the same event_id is sent again and Bliptrace drops duplicates.
What is captured
- Every unhandled exception, with its stack frames, previous exceptions and level.
- The request method, URL and headers, and the signed-in user’s id.
- Exceptions ignored by default (edit
ignore_exceptionsinconfig/bliptrace.php):AuthenticationException,AuthorizationException,ValidationException,TokenMismatchException,NotFoundHttpException,MethodNotAllowedHttpException. - Keys scrubbed before sending (edit
scrub_keys):password,password_confirmation,token,secret,authorization,api_key,apikey,access_token,refresh_token,cookie,set-cookie.
Report a handled exception
use G8Scope\Laravel\Facades\Bliptrace;
try {
$gateway->charge($order);
} catch (\Throwable $e) {
Bliptrace::capture($e);
// carry on handling it your way
}
Optional: settings in the database
Off by default. Turn these on only if you want capture configured from a page in your app instead of .env.
| Variable | Default | Effect |
|---|---|---|
BLIPTRACE_DB_SETTINGS |
false |
Store settings in the g8scope group of spatie/laravel-settings. Stored values override .env |
BLIPTRACE_UI_ENABLED |
false |
Add a settings page at /g8scope/settings (BLIPTRACE_UI_PATH). Needs the DB settings, Laravel 11+, Livewire, Flux and spatie/laravel-settings |
BLIPTRACE_UI_GATE |
manage-g8scope |
Ability checked on every request and save |
The page refuses everyone until you define the ability:
// AppServiceProvider::boot()
Gate::define('manage-g8scope', fn ($user) => $user->isAdmin());
php artisan vendor:publish --tag="bliptrace-settings-migrations"
php artisan migrate # seeds the group from your current .env values
Upgrading from the g8scope names
Version 1.2 renamed the user-facing names. The old ones keep working until 2.0.
| Old | New |
|---|---|
G8SCOPE_* variables |
BLIPTRACE_* |
config/g8scope.php, config('g8scope.*') |
config/bliptrace.php, config('bliptrace.*') |
--tag=g8scope-config |
--tag=bliptrace-config |
G8Scope facade |
Bliptrace facade |
The PHP namespace (G8Scope\Laravel), the settings route and the default gate keep their names. To migrate, rename your variables, then mv config/g8scope.php config/bliptrace.php or publish again with --tag=bliptrace-config.