chore: configure production Sentry integration (#291)
## Summary - wire Laravel exception handling into Sentry via `bootstrap/app.php` - add the `sentry_logs` logging channel and document production Sentry env defaults - keep local/example defaults disabled while enabling the production example for logs, traces, and profiles ## Verification - `vendor/bin/pint --dirty --format agent` - `php artisan sentry:test` could not run locally after disabling the local DSN, which is expected - `php artisan test --compact tests/Feature/ExampleTest.php` currently fails because the local Vite manifest is missing at `public/build/manifest.json`
This commit is contained in:
parent
552aa59aaf
commit
37498111d6
|
|
@ -98,6 +98,7 @@ STRIPE_PRO_YEARLY_LOOKUP_KEY=whisper_pro_yearly
|
|||
SENTRY_LARAVEL_DSN=
|
||||
SENTRY_TRACES_SAMPLE_RATE=1.0
|
||||
SENTRY_PROFILES_SAMPLE_RATE=0
|
||||
SENTRY_ENABLE_LOGS=false
|
||||
|
||||
# Docker Service Ports (forwarded to host)
|
||||
FORWARD_DB_PORT=3307
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ APP_FAKER_LOCALE=en_US
|
|||
|
||||
# Logging
|
||||
LOG_CHANNEL=stack
|
||||
LOG_STACK=single
|
||||
LOG_STACK=single,sentry_logs
|
||||
LOG_LEVEL=error
|
||||
|
||||
# Database (MySQL)
|
||||
|
|
@ -36,6 +36,12 @@ SESSION_ENCRYPT=true
|
|||
# Queue
|
||||
QUEUE_CONNECTION=database
|
||||
|
||||
# Sentry Error Tracking
|
||||
SENTRY_LARAVEL_DSN=
|
||||
SENTRY_TRACES_SAMPLE_RATE=1.0
|
||||
SENTRY_PROFILES_SAMPLE_RATE=1.0
|
||||
SENTRY_ENABLE_LOGS=true
|
||||
|
||||
# Redis (internal to container - no configuration needed)
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ use Illuminate\Foundation\Configuration\Exceptions;
|
|||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
use Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets;
|
||||
use Illuminate\Http\Request;
|
||||
use Sentry\Laravel\Integration;
|
||||
|
||||
return Application::configure(basePath: dirname(__DIR__))
|
||||
->withRouting(
|
||||
|
|
@ -49,5 +50,5 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions): void {
|
||||
//
|
||||
Integration::handles($exceptions);
|
||||
})->create();
|
||||
|
|
|
|||
|
|
@ -118,6 +118,11 @@ return [
|
|||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'sentry_logs' => [
|
||||
'driver' => 'sentry_logs',
|
||||
'level' => env('LOG_LEVEL', 'info'),
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
|
|
|
|||
Loading…
Reference in New Issue