-
-
Notifications
You must be signed in to change notification settings - Fork 452
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 the IgnoreErrorsIntegration integration and deprecate the excluded_exceptions option #928
Add the IgnoreErrorsIntegration integration and deprecate the excluded_exceptions option #928
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, apart from a small nitpick
I see that the Go SDK has a similar extension named |
👍 for that name, I like it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
So we'll have to rename |
No, you can leave your code as is and it will keep working until |
The As soon as the 2.3 version is released, which of the following sentences is true ?
Thanks ! |
This is the reason of this PR, to make such option work in all cases regardless of who is calling the
Sentry\init([
- excluded_exceptions => [
- Exception::class,
- ],
+ integrations => [
+ new Sentry\Integration\IgnoreErrorsIntegration([
+ Exception::class,
+ ]),
+ ],
]); |
Closes #924. I decided that I didn't want to use the
$payload
argument of thecapture*
methods as an hacky way to pass options that configured the behavior of the method. Instead, like in the JS SDK I added a new integration that can be further expanded in the future and that will centralize all the logic to decide whether an event should be captured or not according to a set of criteria that must match with the event data. Being an integration means that the configuration now applies to all those methods and not only to thecaptureException
one, so we cannot enable it by default until3.0