Skip to content
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 error handler integrations option #1439

Closed

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Dec 11, 2022

Sometimes you might want to exclude the error handler integrations from the default ones in case you are using some other error handler implementation, eg a one provided by your framework (see getsentry/sentry-symfony#421).

One problem that having multiple error handlers may cause is having duplicate events in Sentry for the same event.

This PR introduces a new error_handler_integrations option which can be used to skip enabling the error handler integrations without the need to disable all default ones. When set to null, which is the default value, it'll fallback to using the default_integrations option. This is done to preserve backward compatibility.

@HypeMC HypeMC force-pushed the error-handler-integrations-option branch from 26d0080 to 857ee17 Compare December 11, 2022 23:26
@cleptric
Copy link
Member

This should already be possible using Options::integrations, so I rather not add another option to achieve the same.

@HypeMC
Copy link
Contributor Author

HypeMC commented Dec 12, 2022

@cleptric Hi, while it is possible to do it the way you've suggested, it would require coping some of the code to mimic the default behavior and then also keeping that code in sync with any future changes. I was hoping to avoid that, but if you think it'd be better to solve it on the sentry bundle's side using this option, I'm ok with that.

@cleptric
Copy link
Member

We're doing similar things in our Laravel SDK.
While I agree that this adds a bit of boilerplate to your application, I think this is also a use case not many people have.

There is definitely room for improvement on the Symfony SDK when it comes to the way we report errors, which is tracked via getsentry/sentry-symfony#337

@HypeMC
Copy link
Contributor Author

HypeMC commented Dec 12, 2022

@cleptric Thank you for the info, I'll close this one then.

@HypeMC HypeMC closed this Dec 12, 2022
@HypeMC HypeMC deleted the error-handler-integrations-option branch December 12, 2022 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants