echoproxy / sdk-laravel
Laravel SDK for EchoProxy — captures HTTP traffic and ships it to ingest-api. Server middleware + Guzzle middleware + proxy-mode client.
v0.2.0
2026-05-11 05:57 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.5
- psr/http-message: ^1.1|^2.0
- psr/log: ^1.1|^2.0|^3.0
Requires (Dev)
- illuminate/support: ^10.0|^11.0
- phpunit/phpunit: ^10.5
README
Laravel/PHP SDK for the EchoProxy HTTP observability platform.
Install
composer require echoproxy/sdk-laravel
ECHOPROXY_API_KEY=sk_live_xxx ECHOPROXY_ENDPOINT=http://localhost:8081
Capture inbound requests
bootstrap/app.php (Laravel 11):
->withMiddleware(function ($middleware) { $middleware->append(\Sidtrack\Sdk\Middleware\CaptureRequests::class); })
Kernel::$middleware (Laravel 10):
\Sidtrack\Sdk\Middleware\CaptureRequests::class,
Capture outbound HTTP
use GuzzleHttp\Client as Guzzle; use GuzzleHttp\HandlerStack; use Sidtrack\Sdk\Client; use Sidtrack\Sdk\Http\GuzzleMiddleware; $stack = HandlerStack::create(); $stack->push(GuzzleMiddleware::create(app(Client::class))); $guzzle = new Guzzle(['handler' => $stack]);
Redaction
The SDK ships with the same defense-in-depth scrub list as the Go reference:
Authorization,Cookie,X-Api-Key,X-Auth-Token,X-CSRF-Token, …- JSON fields:
password,token,secret,api_key,credit_card, … - Patterns: JWT, Bearer, AWS keys, Stripe, GitHub, Google API, Slack, Luhn-validated cards.
Extend in config/echoproxy.php:
'redact' => [ 'extra_headers' => ['X-Customer-Email'], 'extra_json_fields' => ['account_number'], ],
ingest-api re-applies the same rules server-side, so misconfiguration here is not a wire-leak risk.