feat(sentry): Ajoute Sentry pour le suivi des erreurs

Ajoute Sentry pour le suivi des erreurs en production et améliore la
gestion des erreurs côté client et serveur.
```
This commit is contained in:
Serreau Jovann
2025-11-19 17:41:07 +01:00
parent 87e4dc6f8e
commit 7389c5f02b
5 changed files with 96 additions and 20 deletions

View File

@@ -2,23 +2,7 @@ when@prod:
sentry:
dsn: '%env(SENTRY_DSN)%'
options:
# Add request headers, cookies, IP address and the authenticated user
# see https://docs.sentry.io/platforms/php/data-management/data-collected/ for more info
# send_default_pii: true
ignore_exceptions:
- 'Symfony\Component\ErrorHandler\Error\FatalError'
- 'Symfony\Component\Debug\Exception\FatalErrorException'
# If you are using Monolog, you also need this additional configuration to log the errors correctly:
# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration
# register_error_listener: false
# register_error_handler: false
# monolog:
# handlers:
# sentry:
# type: sentry
# level: !php/const Monolog\Logger::ERROR
# hub_id: Sentry\State\HubInterface
# fill_extra_context: true # Enables sending monolog context to Sentry
# process_psr_3_messages: false # Disables the resolution of PSR-3 placeholders
# 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