when@prod:
  sentry:
    dsn: '%env(SENTRY_DSN)%'

    options:
      before_send: 'sentry.callback.before_send'
      traces_sampler: 'sentry.callback.traces_sampler'

      release: '%env(APP_VERSION)%'
    #        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

  services:
    sentry.callback.before_send:
        class: 'App\Core\Sentry\Sentry'
        factory: [ '@App\Core\Sentry\Sentry', 'getBeforeSend' ]
    sentry.callback.traces_sampler:
        class: 'App\Core\Sentry\Sentry'
        factory: [ '@App\Core\Sentry\Sentry', 'getTracesSampler' ]
        