bugsnag / bugsnag-symfony

BugSnag notifier for the Symfony PHP framework. Monitor and report errors in your Symfony apps.
https://docs.bugsnag.com/platforms/php/symfony
MIT License
43 stars 21 forks source link

Push errors to Bugsnag asynchronously #177

Open lobodol opened 4 months ago

lobodol commented 4 months ago

Description

While taking a look at my Datadog's longest traces, I noticed that, for a 404, 80% of the time is spent in curl sending data to Bugsnag:

image

Describe the solution you'd like My proposal is to add the possibility to push data to Bugsnag asynchronously, relying on Symfony Messenger.

mclack commented 4 months ago

Hi @lobodol

We have added a task to our backlog to allow users to override the Symfony delivery system, which would give you the ability to report errors to BugSnag asynchronously. We can't currently give an ETA on when this could be looked at, but we will make sure to update this thread with any future developments around this.

It is worth noting that we do delivery in the kernel.terminate event, so the request happens after the response has been sent to the user. This means that, although you may notice 80% of the time in your 404s is spent sending data to BugSnag, this will not be affecting the user experience.