Looking to hire Laravel developers? Try LaraJobs

sdk-laravel maintained by echoproxy

Description
Laravel SDK for EchoProxy — captures HTTP traffic and ships it to ingest-api. Server middleware + Guzzle middleware + proxy-mode client.
Author
Last update
2026/05/11 08:06 (dev-main)
License
Downloads
0

Comments
comments powered by Disqus

echoproxy/sdk-laravel

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.