php-http/logger-plugin
PSR-3 logger plugin for HTTPlug (php-http). Logs HTTP requests/responses made through your HTTPlug client, helping you debug and monitor outgoing traffic. Install via Composer and configure with your preferred PSR-3 logger implementation.
/api/v1/payments from /api/v1/refunds in logs). Reduces time spent correlating endpoints with failures or latency./user/profile). Supports granular filtering in SIEM tools (e.g., "All /admin/* requests")./charges endpoint averages 800ms vs. 200ms for /webhooks"). Helps prioritize optimizations for critical paths./messages costs $X vs. /lookups"). Useful for optimizing high-volume or expensive endpoints.laravel-debugbar for endpoint-specific insights).http.url in OpenTelemetry specs)./api/v1/users from /api/v1/roles in logs)./admin/*)./health).monolog/handler with custom processors).For Executives: *"The latest update (1.5.0) adds endpoint-level visibility to our HTTP logging—like GPS coordinates for API calls. Now we can:
/payments/process vs. /payments/refund)./messages costs 3x more than /lookups’)./admin/* requests’).
It’s a zero-cost upgrade to our existing logging setup, and it works seamlessly with tools like Datadog or OpenTelemetry. Let’s pilot it on our highest-risk API (e.g., Stripe) to validate the ROI."*For Engineers:
*"The new request.uri context in 1.5.0 makes logs way more actionable. Example:
// Before: Generic log line for Stripe API calls
// After: Clear endpoint distinction
[2023-10-01] INFO Stripe API call (uri: /v1/charges, status: 200, duration: 150ms)
// Use case: Debugging a flaky refund endpoint
grep '/refunds' storage/logs/laravel.log | grep '500'
// Pro tip: Pair with Laravel’s `tap` for dynamic URI logging:
$client->get('/api/v1/users')->tap(function ($response) {
logger()->info('URI context', ['uri' => $response->getEffectiveUri()]);
});
No breaking changes—just drop the updated package and start seeing URIs in your logs. Start with a problematic API to validate the value."*
For DevOps/SRE: *"This update supercharges our HTTP observability by adding URI context, which helps us:
/payments/process’)./charges >500ms’)./admin/* requests for audit’).
Proposal: Update the package in our [logging standard] and configure it to include URIs in [existing tool]. Start with the /api/v1/payments endpoint to validate the signal quality."*How can I help you explore Laravel packages today?