Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Bugsnag Laravel

Bugsnag Laravel Laravel Package

bugsnag/bugsnag-laravel

Bugsnag's Laravel and Lumen notifier automatically reports unhandled exceptions and crashes, lets you report handled exceptions via Bugsnag::notify(), and attaches user info and custom diagnostic data to show how many people are affected.

View on GitHub
Deep Wiki
Context7

Bugsnag for Laravel is an exception reporter that integrates with Laravel and Lumen to provide instant notifications for errors and exceptions. It automatically captures unhandled exceptions and crashes, and lets you report handled exceptions via Bugsnag::notify(), helping you monitor application health in production. Configure it through the integration guide and documented options, and attach user information and custom diagnostic data to understand how many people are affected.

  • Automatic reporting of unhandled exceptions and crashes
  • Manual reporting of handled exceptions with Bugsnag::notify()
  • Rich context via user info and custom diagnostic data
  • Support for both Laravel and Lumen
  • Configurable through documented integration options
Frequently asked questions about Bugsnag Laravel
What is bugsnag/bugsnag-laravel used for?
It is the official Bugsnag notifier for Laravel and Lumen applications. It automatically reports unhandled exceptions and lets you manually report handled exceptions with user context and custom diagnostic data.
How do I install bugsnag/bugsnag-laravel in a Laravel app?
Install it with composer require bugsnag/bugsnag-laravel, set BUGSNAG_API_KEY in your .env file, and publish the config if you need to customize defaults. Then verify reporting by calling Bugsnag::notify(new Exception('Test')) from a route or job.
Does bugsnag-laravel support Lumen?
Yes. The package explicitly supports Lumen as well as Laravel, which makes it suitable for microservices and API-heavy applications. The shared codebase keeps behavior consistent across both frameworks.
Which Laravel and PHP versions does bugsnag/bugsnag-laravel support?
The current package aligns with modern Laravel and Lumen versions and requires PHP 8.0 or newer plus Laravel or Lumen 8.x or newer. Older Laravel 4 projects should use the v1 package on the 1.7 branch.
How does Bugsnag automatically report unhandled exceptions in Laravel?
It registers a Laravel service provider and integrates with Laravel's exception handler to capture unhandled exceptions automatically. That reduces boilerplate while still allowing manual reports when you need granular control.
How do I report handled exceptions with Bugsnag in Laravel?
Use Bugsnag::notify() and pass the exception or throwable you want to report. This is useful for caught exceptions where you still want visibility but do not want the request to fail.
How do I configure the Bugsnag API key in Laravel?
Set BUGSNAG_API_KEY in your .env file and publish the package config with the Bugsnag service provider if you need to change defaults. Configuration is centralized so you can enable or disable reporting per environment.
Can I attach user information and custom metadata to Bugsnag errors?
Yes. You can attach user context, custom metadata, and device or environment data to error reports. This helps you understand how many people are affected and include domain-specific details such as transaction IDs.
Does bugsnag-laravel report errors from queue workers and Artisan commands?
The package hooks into Laravel's exception handling, so exceptions that flow through that pipeline can be reported. For queue workers and Artisan commands, coverage depends on how your application handles and surfaces failures, so test those paths and call Bugsnag::notify() for handled cases.
What are the production concerns with bugsnag-laravel?
The main production concerns are network calls to Bugsnag during errors, third-party data privacy, and vendor lock-in to a proprietary SDK. Test under expected load, review GDPR or HIPAA requirements, and consider an abstraction layer if you may switch providers. Monitor package updates for Laravel exception-system changes.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package