# Sentry/GlitchTip Configuration
# Error tracking with automatic context enrichment
#
# To enable error tracking:
# 1. Set up GlitchTip at http://localhost:8081 (via make up-full)
# 2. Create a project and get the DSN
# 3. Add SENTRY_DSN to .env.local

sentry:
    dsn: '%env(default::SENTRY_DSN)%'
    register_error_handler: false  # Disable when DSN is empty
    options:
        environment: '%env(SENTRY_ENVIRONMENT)%'
        send_default_pii: false  # CRITICAL: No PII in error reports (RGPD)

when@prod:
    sentry:
        register_error_handler: true  # Enable in production
        options:
            before_send: 'App\Shared\Infrastructure\Monitoring\SentryBeforeSendCallback'

when@test:
    sentry:
        dsn: ''
