Automatic Laravel breadcrumbs
Closed this issue · 4 comments
This issue depends on honeybadger-io/honeybadger-php#140.
Once we have the API for adding breadcrumbs, we can add some types of breadcrumbs automatically for Laravel. Here are the docs on the types of breadcrumbs we automatically collect in Rails (read the whole guide for ideas).
Let's start a list of things we'd like to instrument in Laravel (feel free to add to this):
I'm thinking:
- Blade render calls
- SQL queries
- Redis queries
- Notification dispatches
- Email dispatches
- Job dispatches
Is there a way to hook into controller actions to report a breadcrumb when one is called? We have these in Rails:
Also cache read/hit breadcrumbs may be useful if Laravel has built-in caching.
AFAIK, Laravel doesn't provide an official way to hook into controller events, but I think it should be doable, thanks to the way the framework is written.
Yep, cache comes with Laravel (I mentioned Redis in my earlier comment😅), so that can be done.