spatie/flare-debug-sender
Debug sender for Flare payloads, mainly for internal testing. Swap Flare’s sender to log, inspect, and optionally passthrough errors/traces/zipkin, replace tracing IDs/timestamps, and print parts or the full payload via configurable channels.
FileDebugChannel or real-time monitoring with RayDebugChannel). The ability to define custom senders (e.g., HTTP mocks, database loggers) further extends its utility.2.0.0 release), ensuring compatibility with its updated payload structure, context data, and tracing features. This is critical for teams adopting Flare v3, as it validates payload formats and custom integrations before deployment.vendor:publish for config, service provider hooks). The package assumes a Laravel environment, which may require additional abstraction for non-Laravel PHP applications.RayDebugChannel), customizing channels or senders (e.g., for testing) introduces minor complexity. The flare.php configuration is well-documented but may require adjustments for edge cases (e.g., SSL verification, payload sanitization).composer test command, but the package’s primary "test" is its ability to simulate Flare payloads. This shifts testing responsibility to the application layer, where developers must verify payloads match production expectations.CurlSender config disables SSL verification (CURLOPT_SSL_VERIFYHOST/CURLOPT_SSL_VERIFYPEER), which could expose applications to MITM attacks if misconfigured. This should be disabled in production or replaced with a secure sender.print_full_payload or passthrough_errors risk exposing sensitive data (e.g., stack traces, API keys) in logs. Developers must explicitly disable these in non-development environments.passthrough_errors) could duplicate error handling logic if not managed carefully.RayDebugChannel requires Ray to be installed and running, adding a dependency that may not be universally available.FileDebugChannel) could lead to permission issues or log rotation challenges in production-like environments.Flare Adoption Strategy:
Debugging Workflow:
Operational Considerations:
.env) or feature flags?FileDebugChannel) to avoid disk space issues?Integration with Existing Tools:
Risk Mitigation:
spatie/flare) to ensure they align with your security policies?passthrough_errors=false, print_full_payload=false).vendor:publish is configured to publish Flare’s config (php artisan vendor:publish --tag=flare-config).composer require spatie/flare-debug-sender
config/flare.php to use the debug sender (see Usage in the README).'sender' => [
'class' => \Spatie\FlareDebugSender\FlareDebugSender::class,
'config' => [
'passthrough_errors' => false, // Disable in production
'channel' => \Spatie\FlareDebugSender\Channels\RayDebugChannel::class,
'sender_config' => [
'curl_options' => [
CURLOPT_SSL_VERIFYHOST => 2, // Re-enable SSL verification
CURLOPT_SSL_VERIFYPEER => true,
],
],
],
],
2.0.0 release.RayDebugChannel: Requires Ray to be installed (composer require spatie/ray).LaravelLogDebugChannel: No additional dependencies.FileDebugChannel: RequHow can I help you explore Laravel packages today?