bugsnag / bugsnag-laravel

BugSnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
https://docs.bugsnag.com/platforms/php/laravel/
MIT License
874 stars 129 forks source link

Support for Laravel 11's Context #536

Closed henze-housepedia closed 3 months ago

henze-housepedia commented 5 months ago

Description

Laravel comes with a new feature called Context. This automatically append context data to the log entries. Unfortunately this is added as an extra and not directly into the meta data, and thus not being picked up by Bugsnag.

Describe the solution you'd like It would be nice if bugsnag automatically appends these context data.

Describe alternatives you've considered Ofcourse, I can setup Bugsnag::registerCallback where I add the context data, but this is merely a workaround.

Additional context Ironically there is extra context: the documentation: https://laravel.com/docs/11.x/context

mclack commented 4 months ago

Hi @henze-housepedia

Thanks for raising this with us. We've now added a task to our backlog to support automatic attachment of Laravel's Context to BugSnag error reports.

We don't currently have an ETA on when this could be looked at, but we'll make sure to post any updates on this thread.

mclack commented 3 months ago

Hi @henze-housepedia

I'm reaching out to let you know that automatic attachment of Laravel's Context is now supported as of the v2.28.0 release of bugsnag-laravel: https://github.com/bugsnag/bugsnag-laravel/releases/tag/v2.28.0

As such, we have also added a section in the BugSnag documentation: https://docs.bugsnag.com/platforms/php/laravel/automatically-captured-data/#context-information

Thanks again for raising this with us. Please let us know if you have any issues with this after upgrading your BugSnag SDK.