1

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"
Paul Andrieux
  • 1,836
  • 11
  • 24
dr_fg2
  • 47
  • 1
  • 1
  • 5
  • Does this answer your question? [How to exclude exceptions from Sentry in Symfony?](https://stackoverflow.com/questions/66154926/how-to-exclude-exceptions-from-sentry-in-symfony) – greeflas Jun 09 '22 at 21:41

0 Answers0