feat(sentry): Ajoute l'intégration de Sentry pour le suivi des erreurs.

This commit is contained in:
Serreau Jovann
2025-10-16 08:42:01 +02:00
parent c448043b5b
commit 6e6b571243
13 changed files with 157 additions and 16 deletions

View File

@@ -5,5 +5,17 @@ use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
if($_ENV['APP_ENV'] == "prod") {
\Sentry\init([
'dsn' => $_ENV['SENTRY_DSN'],
// Specify a fixed sample rate
'traces_sample_rate' => 1.0,
// Set a sampling rate for profiling - this is relative to traces_sample_rate
'profiles_sample_rate' => 1.0,
// Enable logs to be sent to Sentry
'enable_logs' => true,
]);
}
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};