antlerslabs / runes-laravel
Laravel SDK for Runes error tracking
Requires
- php: ^8.2
- illuminate/contracts: ^11.0|^12.0|^13.0
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/queue: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Laravel SDK for Runes error tracking.
It reports unhandled exceptions, queue job failures, request context, users, breadcrumbs and releases to your Runes project.
Requirements
- PHP 8.2+
- Laravel 11, 12 or 13
Installation
composer require antlerslabs/runes-laravel
When developing against the Runes monorepo, add a path repository to the consumer application first:
{
"repositories": [
{
"type": "path",
"url": "../runes/packages/runes-laravel",
"options": {
"symlink": true
}
}
]
}
Then install:
composer require antlerslabs/runes-laravel:@dev
Configure
Add the DSN from your Runes project settings to .env:
RUNES_DSN=https://PUBLIC_KEY@runes.astronxs.com/PROJECT_ID RUNES_ENVIRONMENT=production RUNES_RELEASE=v1.0.0 RUNES_SAMPLE_RATE=1.0 RUNES_SEND_DEFAULT_PII=false
Clear the config cache after changing the environment:
php artisan config:clear
The SDK registers itself through Laravel package discovery. No provider registration is required.
Optional config
Publish the config file to customise sampling, ignored exceptions and PII:
php artisan vendor:publish --tag=runes-config
Manual reporting
The Runes facade is available automatically:
use Runes\Laravel\Facades\Runes; Runes::captureException($exception); Runes::captureMessage('Checkout failed', 'warning', [ 'order_id' => $order->id, ]);
What is captured
- Unhandled exceptions via Laravel's exception handler
- Queue job exceptions
- Request URL and method
- Authenticated user ID
- Recent log breadcrumbs
- Environment, release, PHP and Laravel versions
Request headers are scrubbed for credentials and session data. User email,
name, request bodies and query strings are excluded unless
RUNES_SEND_DEFAULT_PII=true.
Verify the connection
php artisan tinker --execute 'report(new RuntimeException("Runes connection test"));'
Then check the project's Issues page in Runes.
Enable RUNES_DEBUG=true to log SDK delivery failures.
License
MIT