Download the PHP package upgradelabs/sentinel-laravel without Composer
On this page you can find all versions of the php package upgradelabs/sentinel-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download upgradelabs/sentinel-laravel
More information about upgradelabs/sentinel-laravel
Files in upgradelabs/sentinel-laravel
Package sentinel-laravel
Short Description Laravel error reporting client for Sentinel. Captures exceptions and sends them to your Sentinel dashboard.
License MIT
Informations about the package sentinel-laravel
Sentinel Laravel
Error reporting client for Sentinel. Captures exceptions from your Laravel application and sends them to your Sentinel dashboard.
Compatible with Laravel 8, 9, 10, 11, 12, and 13.
Installation
Configuration
Add your Sentinel API token to .env:
That's it. Sentinel will automatically capture and report unhandled exceptions.
The token identifies your project — you get it when creating a project on the Sentinel dashboard or via php artisan sentinel:create-project on the Sentinel server.
Publish config (optional)
Optional Configuration
Point at a self-hosted / local Sentinel instance
By default the client talks to the hosted https://sentinel.upgradelabs.pt. Override for a self-hosted or local development instance:
Report only from specific environments
Send reports via queue (recommended for production)
Disable reporting
Heartbeat (automatic)
Sentinel pings the dashboard every 5 minutes to report your app is alive. This powers the status page. It's enabled by default — requires the Laravel scheduler to be running:
To disable:
Ignored exceptions
Edit config/sentinel.php to customize which exceptions are ignored:
Manual Reporting
You can manually report exceptions:
Laravel 8/9 (Manual Handler Setup)
For older Laravel versions where automatic reportable() registration may not work, add the trait to your exception handler:
What Gets Reported
Each error report includes:
- Exception class, message, file, line
- Full stack trace
- Severity (auto-detected: fatal, error, warning, notice)
- Laravel & PHP version
- Environment (production, staging, local, etc.)
- Request data (URL, method, headers, input — sensitive fields redacted)
- Authenticated user (id, email, name)
- Previous exception chain
- Custom context (order_id, payment_method, etc.)
- Breadcrumbs (DB queries, cache, jobs — sequence of events before the error)
- Performance (request duration, memory usage — when middleware is active)
Data Privacy
Sensitive fields are automatically redacted from request data:
password,password_confirmationtoken,secretcredit_card,card_number,cvv,ssn- Authorization, Cookie, and CSRF headers
Deploy Tracking
Notify Sentinel when you deploy so you can correlate errors with releases.
Artisan command (recommended)
All flags are optional. Use --auto to detect tag (from git tag), commit hash, and branch automatically.
In CI/CD pipelines
GitHub Actions:
Laravel Forge / Envoyer (deploy script):
Or with curl (no package needed):
Programmatic usage
Context Enrichment
Add custom context that gets attached to any error that occurs during the request:
Breadcrumbs
Breadcrumbs automatically track the sequence of events leading up to an error. Enabled by default.
Auto-captured events:
- Database queries (SQL, time, connection)
- Cache hits and misses
- Queue job processing
Add manual breadcrumbs:
Configure in config/sentinel.php:
Performance Tracking
Track request duration and memory usage by adding the middleware:
Performance data (duration_ms, memory_peak_mb) is automatically included in error reports.
Performance Monitoring
Independently from error reporting, Sentinel captures per-request, per-queue-job, and per-console-command query performance — slow queries and N+1 patterns — and reports it to your Sentinel dashboard's Performance view via its own /api/v1/performance endpoint.
What it captures:
- Slow queries — any query whose duration crosses
slow_query_ms. - N+1 patterns — the same SQL shape + caller location repeated
n_plus_one_thresholdor more times within one request, job, or command. - HTTP, queue jobs, and console commands — capture is not middleware-only; it works across all three runtimes (including Octane).
- SQL-shape only, never bound values — literals (emails, tokens, IDs, etc.) are stripped from every captured query before anything leaves your app, so reports are PII-safe by construction.
- Fail-open — if the Sentinel dashboard is unreachable or reporting errors out, your application is completely unaffected.
It's enabled by default alongside error reporting — no extra setup required beyond your SENTINEL_TOKEN.
Configuration
All settings live under the performance block in config/sentinel.php:
| Env var | Default | Description |
|---|---|---|
SENTINEL_PERFORMANCE_ENABLED |
true |
Enable/disable performance monitoring, independently of error reporting (SENTINEL_ENABLED). |
SENTINEL_PERFORMANCE_SAMPLE_RATE |
1.0 |
Fraction of requests/jobs/commands instrumented (1.0 = all). |
SENTINEL_PERFORMANCE_SLOW_QUERY_MS |
100 |
A query at or above this duration (ms) is flagged as a slow query. |
SENTINEL_PERFORMANCE_N_PLUS_ONE_THRESHOLD |
10 |
Number of repeats of the same SQL shape + caller location, within one request/job/command, that flags an N+1. |
SENTINEL_PERFORMANCE_MAX_QUERIES_PER_REPORT |
100 |
Hard cap on the number of queries included in a single report's trace. |
SENTINEL_PERFORMANCE_BACKTRACE_DEPTH |
30 |
Number of stack frames walked to resolve a query's origin (file:line). Lazy-loaded relations (the common N+1 case) put the calling code deep beneath Eloquent's own frames, so a shallow cap resolves the origin to null; 30 reaches the caller in typical stacks while keeping the per-query walk cheap. Increase it if origins for deeply-nested calls come back empty. |
SENTINEL_PERFORMANCE_QUEUE |
_(none — falls back to SENTINEL_QUEUE)_ |
Queue name performance reports are dispatched to. Leave unset (with SENTINEL_QUEUE also unset) to send reports synchronously. |
Environment gating is reused from the top-level SENTINEL_ENVIRONMENTS setting above — there is no separate performance-only environment list.
Disable performance monitoring
Octane
The package registers its query profiler as a scoped (never singleton) container binding and resets it on every request/job/command boundary, so it's Octane-safe by construction. As defense-in-depth, we still recommend also adding it to config/octane.php's flush array:
Log Channel
Send Laravel log entries to Sentinel by adding a custom log channel:
Then use it alongside your default channel:
Read API
Pull data from Sentinel for external tools (Grafana, custom dashboards):
Testing
Verify configuration
Test error reporting
Test heartbeat
Send a manual heartbeat to verify your app shows as "Online" on the Sentinel status page:
Or test with curl using your project's API token:
Once a heartbeat is received, your project shows as Online on the status page. If no heartbeat is received for 10+ minutes, it switches to Offline and a critical alert email is sent.
With the scheduler running (* * * * * php artisan schedule:run), heartbeats are sent automatically every 5 minutes — no manual work needed.
License
MIT
All versions of sentinel-laravel with dependencies
illuminate/http Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0