Skip to content

add notify except #37

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

Closed
wants to merge 2 commits into from
Closed

Conversation

roboticsexpert
Copy link

Add feature to add some exception to config for not reporting to bugsnag

@GrahamCampbell
Copy link
Contributor

This is already a supported feature, via registering filters.

@GrahamCampbell
Copy link
Contributor

This is being made easier in #36 too.

@GrahamCampbell
Copy link
Contributor

GrahamCampbell commented Apr 3, 2017

If we were to implement this feature directly, it would have to be implemented itself as a "callback", rather than being mushed into the code.

@roboticsexpert
Copy link
Author

i really don't understand how can filter some exception type with callback but i think your idea should be better than me ...

my problem was bandwidth of reporting exceptions to bugsnag that have very large impact on our limit (about 600mb every day), so for that i implement easiest way ...

but if possible to present some example code for your solution , i will appreciate you ...

@GrahamCampbell
Copy link
Contributor

You can implement this in your app using callbacks, and there's no need for any changes to this package. Please see the docs at https://docs.bugsnag.com/platforms/php/symfony/configuration-options/#callbacks.

You can programmatically skip notifying:

$this->get('bugsnag')->registerCallback(function ($report) {
    if ($report->getName() === 'Foo\Bar\Exception') {
        return false;
    }
});

@GrahamCampbell
Copy link
Contributor

What I was saying that if we were to add this feature natively to this package, then it wouldn't need modifications like this. All we'd do is provide a callback that registers from the config file automatically if excluded exceptions are provided.

@roboticsexpert
Copy link
Author

thank alot ... i fully understood ....

finally, want you add this feature to this package (if i implement that as you say) or not ?

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.

2 participants