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

Php Error Insight Laravel Package

raffaelecarelle/php-error-insight

PHP Error Insight adds clearer, more actionable error reporting to Laravel apps: richer exception messages, context, and stack details so developers can diagnose failures faster. Lightweight, easy to install, and designed to fit naturally into existing Laravel logging and debugging workflows.

View on GitHub
Deep Wiki
Context7

Getting Started

Install the package via Composer:

composer require raffaelecarelle/php-error-insight

Laravel auto-discovery registers the service provider. Publish the config file:

php artisan vendor:publish --tag=error-insight-config

Review config/error-insight.php to enable/disable capture, set the storage driver (log, database, or custom), and configure filters. The first use case is to capture unhandled exceptions and enrich them with request context, user data, and environment details so you can debug faster in development and staging.

Implementation Patterns

  • Integrate with Laravel’s exception handler – In App\Exceptions\Handler, call the package’s reporter from report() before or after the default logging. This ensures all exceptions flow through Error Insight.
  • Custom reporters for specific exceptions – Use the package’s reporter contract to create tailored handlers for domain exceptions (e.g., payment failures) that attach extra metadata like order IDs.
  • Filter sensitive data – Configure the sensitive_keys array in the config to scrub passwords, tokens, and personal data from request payloads and headers.
  • Group and deduplicate – Leverage built-in fingerprinting to group similar errors. Override the fingerprint generator if you need to include custom context (e.g., tenant ID) in the grouping.
  • Dashboard or log review – If the package provides a UI, register its routes and middleware; otherwise, tail the dedicated log channel or query the insights table to review recent errors.
  • Queue-friendly – When reporting from queued jobs, ensure the package captures job context (class, payload) and that your queue workers are restarted after config changes.

Gotchas and Tips

  • Performance overhead – Capturing full request/response data can be heavy. Enable sampling in production or restrict capture to specific environments.
  • Sensitive data leakage – Always audit the sensitive_keys config; the package may capture request bodies by default. Use the should_report callback to skip health checks or bots.
  • Config caching – After changing config/error-insight.php, run php artisan config:clear (or config:cache in production) to avoid stale settings.
  • Extension points – Most behavior is customizable via contracts: custom insight providers, formatters, and storage drivers. Bind your implementations in a service provider.
  • Debugging missing insights – Check that the exception handler is actually calling the reporter, verify the storage driver is writable, and confirm that the enabled flag is true for the current environment.
  • Upgrading – Version 1.0.18 is a patch release; no breaking changes are expected. Run your test suite after upgrading and review the changelog for any bug fixes that might affect your integration.
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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style