Closed jonathan-bird closed 3 years ago
By default, this is set to false: https://github.com/bugsnag/bugsnag-laravel/blob/master/config/bugsnag.php#L286.
Yeah I just found this too. When I published the config, it worked fine by default, but without it (which is what I had), was reverting to true.
Seems strange it adds so much to a request too. I'm in Aus so maybe they use a US server? But I wouldn't expect a request with such basic information to be more than 50ms. I would also expect it to be batched & queue'd as the recommended solution. What do you think? I saw the batch config, but couldn't tell if this was for reporting sessions or only for errors as it says - https://docs.bugsnag.com/platforms/php/laravel/configuration-options/#batch-sending
Hi @jonathan-bird,
You're correct, the BUGSNAG_BATCH_SENDING
config option is only for errors and doesn't apply to session reporting.
BUGSNAG_CAPTURE_SESSIONS
should always default to false if there is no config file - if you're seeing behaviour other than this please feel free to re-open the issue with a repro case.
Describe the bug
By default when you install the dependency,
BUGSNAG_CAPTURE_SESSIONS
is set to true if you don't publish the vendor config file.It's taken me weeks to be able to debug our application and why it was slower on the live site than test site. If you have this set to true, it was increasing every request by 150ms. We have all XL instances on AWS so knew it wasn't caused by infrastructure.
Playing around more, I switched this to false, immediately dropped request from 300-350ms down to 150ms. Turning it back to true immediately increased it back. I spun up another instance to check this on another config and found the same thing again.
We are checking the "Document Request Time" in chrome. In network tab, under "doc", you can see the actual document total request time.
I would expect that it should be heavily documented since this is the case, and disabled by default. The trade-off of a slow request is not worth having the session logs in Bugsnag... especially not on any medium to large application.
Steps to reproduce
BUGSNAG_CAPTURE_SESSIONS=false
in the .env file and clear any config caches (and recache)Environment