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

Support for `auto_capture_sessions` #151

Open alcohol opened 2 years ago

alcohol commented 2 years ago

Description

The Symfony bundle does not seem to provide a way to configure the auto_capture_sessions option. The Laravel integration does provide this.

Describe the solution you'd like

It would be nice if this could be configured through the bundle configuration.

Describe alternatives you've considered

Currently I set this manually after loading the bundle and configuration in our Symfony kernel.

xljones commented 2 years ago

Hey @alcohol, cheers for the request. Full support for session tracking in Symfony is something that's on our roadmap considered for the future. We'll be sure to let you know about any changes on this front. Your current alternative is the most suitable workaround for now though.

For future travellers, you can use $this->get('bugsnag')->startSession() in Symfony, which is equivalent to a call to $bugsnag->startSession() in the plain PHP notifier, which bugsnag-symfony uses: https://docs.bugsnag.com/platforms/php/other/#session-tracking