when@prod:
    sentry:
        register_error_listener: true # Disables the ErrorListener to avoid duplicated log in sentry
        register_error_handler: true # Disables the ErrorListener, ExceptionListener and FatalErrorListener integrations of the base PHP SDK

        options:
            release: '%app.version%'
            traces_sample_rate: 1
            profiles_sample_rate: 1
            attach_stacktrace: true

        tracing:
            enabled: true
            dbal: # DB queries
                enabled: true
            cache: # cache pools
                enabled: true
            twig: # templating engine
                enabled: true

    services:
        # (Optionally) Configure the breadcrumb handler as a service (needed for the breadcrumb Monolog handler)
        Sentry\Monolog\BreadcrumbHandler:
            arguments:
                - '@Sentry\State\HubInterface'
                - !php/const Monolog\Logger::INFO # Configures the level of messages to capture as breadcrumbs
    monolog:
        handlers:
            # (Optionally) Register the breadcrumb handler as a Monolog handler
            sentry_breadcrumbs:
                type: service
                name: sentry_breadcrumbs
                id: Sentry\Monolog\BreadcrumbHandler
            # Register the handler as a Monolog handler to capture messages as events
            sentry:
                type: sentry
                level: !php/const Monolog\Logger::ERROR # Configures the level of messages to capture as events
                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 in reported messages
