-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to ignore exception thrown by Symfony Messenger if there is a retry. #363
Comments
This was already implemented in the original PR, with the |
Hi @Jean85 ! Thanks for your quick answer. I just made a try with:
And the retry strategy:
I'm also use the monolog handler for sentry
With a MessageHandler like
I get the following exceptions on Sentry If I use
I get each exceptions 4 times. Shouldn't the |
The issue is in the fact that you're using both the integration and the Monolog handler. The option regards the native integration only, see https://github.com/getsentry/sentry-symfony/blob/master/src/EventListener/MessengerListener.php#L36 |
Yes, but it could be great to support this :)
What are my options ?
Edit: I excluded the |
Using both is not something I expect from this bundle, it leads to a lot of mess. We're considering switching to Monolog only in #337 |
Using only monolog wouldn't allow to ignore soft fail exceptions. Which is a pretty useful feature. |
Ouch, you're right! But how do you handle having both enabled? Don't you receive duplicated events anyway? |
I made multiple try with the following example
With
I received 4 Exceptions and 4 HandlerFailedExceptions, so they indeed does the same things. With
I received only 1 Exception but still 4 HandlerFailedExceptions. So I understood that the messenger integration send the Exception to Sentry, and the logger was sending the HandlerFailedExceptions. With
I have no duplicate now. If you want to switch to Monolog only, it would just need a special treatment for HandlerFailedException. But I'm not sure how/if you can know that there will be a |
See my message here: #337 (comment) |
Let's say I use Symfony Messenger with the following config:
The following scenarios can occur:
Currently, case 2, 3 and 4 are sending error messages on Sentry.
Is there a way to only get error message on Sentry for case 4 ?
The text was updated successfully, but these errors were encountered: