db1e0cb265
Ajout du SDK sentry/sentry-symfony enregistré prod-only, config sentry.yaml (DSN runtime, release app.version, 4xx ignorés, pas de tracing) et handler Monolog ERROR+. Sans SENTRY_DSN le SDK est no-op. Transport réseau via Tailscale (infra, hors repo). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.5 KiB
YAML
45 lines
1.5 KiB
YAML
monolog:
|
|
channels: [deprecation, cron]
|
|
|
|
when@dev:
|
|
monolog:
|
|
handlers:
|
|
cron:
|
|
type: stream
|
|
path: "%kernel.logs_dir%/cron.log"
|
|
level: info
|
|
channels: [cron]
|
|
main:
|
|
type: stream
|
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
level: debug
|
|
channels: ["!event", "!cron"]
|
|
console:
|
|
type: console
|
|
process_psr_3_messages: false
|
|
channels: ["!event", "!doctrine", "!console"]
|
|
|
|
when@prod:
|
|
monolog:
|
|
handlers:
|
|
cron:
|
|
type: stream
|
|
path: "%kernel.logs_dir%/cron.log"
|
|
level: info
|
|
channels: [cron]
|
|
main:
|
|
type: stream
|
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
level: debug
|
|
channels: ["!deprecation", "!cron"]
|
|
deprecation:
|
|
type: stream
|
|
channels: [deprecation]
|
|
path: "%kernel.logs_dir%/deprecations.log"
|
|
# Remonte les logs ERROR+ vers GlitchTip en tant qu'Issues (service défini
|
|
# dans sentry.yaml). Envoi immédiat, indépendamment des handlers fichier.
|
|
sentry:
|
|
type: service
|
|
id: Sentry\Monolog\Handler
|
|
channels: ["!event", "!doctrine", "!deprecation", "!cron"]
|