Sentry on Symfony:如何排除`NotFoundHttpException`

问题描述

我正在使用SentryBundle将Sentry集成到我的Symfony应用中。

我不想记录“ NotFoundExceptions”,因此我以这种方式配置了包:

sentry:
    dsn: '%env(SENTRY_DSN)%'
    register_error_listener: false # Disables the ErrorListener
    monolog:
        error_handler:
            enabled: true
            level: error
    messenger:
        enabled: true # flushes Sentry messages at the end of each message handling
        capture_soft_fails: true # captures exceptions marked for retry too
    options:
        environment: '%kernel.environment%'
#        release: '%env(VERSION)%' #your app version
        excluded_exceptions:
            - Symfony\Component\HttpKernel\Exception\NotFoundHttpException

不幸的是,这似乎还不够,因为例外情况继续记录在Sentry中。

我在做什么错了?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)