路径的无效配置“ sentry.options.Integrations.0:期望服务参考,got”,“ sentry \\ intemation \\ intermation \\ ignoreErrorsIntegration”; quot;

发布于 2025-02-05 23:52:08 字数 759 浏览 3 评论 0原文

我在symfony4.4中设置sentry,以忽略某些类型的异常。在文档之后,我设置config.yml以这种方式:

sentry:
    dsn: "%sentry%"
    register_error_listener: true
    options:
        attach_stacktrace: true
        integrations:
            - 'Sentry\Integration\IgnoreErrorsIntegration'

我添加到services.yml

Sentry\Integration\IgnoreErrorsIntegration:
        arguments:
            $options:
                ignore_exceptions:
                    - RuntimeException

decestions已记录,但是当我添加忽略配置时,我就会收到此错误

Invalid configuration for path "sentry.options.integrations.0": Expecting service reference, got ""Sentry\\Integration\\IgnoreErrorsIntegration"

I'm setting sentry in Symfony4.4 to ignore some types of exceptions. Following the doc, I set config.yml this way:

sentry:
    dsn: "%sentry%"
    register_error_listener: true
    options:
        attach_stacktrace: true
        integrations:
            - 'Sentry\Integration\IgnoreErrorsIntegration'

and I added to services.yml

Sentry\Integration\IgnoreErrorsIntegration:
        arguments:
            $options:
                ignore_exceptions:
                    - RuntimeException

The exceptions are logged but when I added the ignore configuration I got this error

Invalid configuration for path "sentry.options.integrations.0": Expecting service reference, got ""Sentry\\Integration\\IgnoreErrorsIntegration"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文