Download the PHP package echoproxy/sdk-laravel without Composer
On this page you can find all versions of the php package echoproxy/sdk-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download echoproxy/sdk-laravel
More information about echoproxy/sdk-laravel
Files in echoproxy/sdk-laravel
Package sdk-laravel
Short Description Laravel SDK for EchoProxy — captures HTTP traffic and ships it to ingest-api. Server middleware + Guzzle middleware + proxy-mode client.
License MIT
Homepage https://github.com/songhieu/EchoProxy
Informations about the package sdk-laravel
echoproxy/sdk-laravel
Laravel/PHP SDK for the EchoProxy HTTP observability platform.
Install
Capture inbound requests
bootstrap/app.php (Laravel 11):
Kernel::$middleware (Laravel 10):
Capture outbound HTTP — pick a mode
There are two ways to capture outbound calls. Pick one per project.
Proxy mode (ProxyClient) |
Capture mode (GuzzleMiddleware) |
|
|---|---|---|
| Who calls the upstream | proxy-gateway (Go) | your app (Guzzle) |
| Where the event is emitted | proxy-gateway → Kafka | SDK → ingest-api → Kafka |
| Latency added | ~1 hop to proxy-gateway | ~µs (event buffered + flushed at request shutdown) |
upstream_latency_ms |
measured server-side via httptrace (authoritative) |
measured via Guzzle on_stats → TransferStats::getTransferTime() |
upstream_ttfb_ms |
yes, real TTFB | yes when cURL handler is used (starttransfer_time); else 0 |
| Body capture cap | enforced in proxy-gateway | enforced in SDK |
| Code change | swap Http::* for ProxyClient::* |
wire one Guzzle handler-stack push |
Dashboard source |
proxy-gateway |
sdk-laravel |
| Dashboard mode badge | proxy | capture |
When to use which
- Proxy mode — the default. Use whenever your app can reach
proxy-gateway:8080. You get the most accurate timing (TTFB, upstream RoundTrip, proxy overhead) and don't have to manage buffer/flush. - Capture mode — use when (a) your runtime can't reach the proxy, (b) you have many existing call-sites using Guzzle directly (lots of vendor SDKs do — Stripe, AWS, etc.) and don't want to refactor, or (c) you need per-call programmatic context (custom redaction, sample rate) that the proxy can't see.
Proxy mode — drop-in for Http::*
Capture mode — Guzzle handler stack
Works with any library that accepts a Guzzle HandlerStack. The middleware uses Guzzle's on_stats to measure transport time separately from PHP overhead — chains any caller-supplied on_stats, so it composes safely.
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:
ingest-api re-applies the same rules server-side, so misconfiguration here is not a wire-leak risk.
All versions of sdk-laravel with dependencies
guzzlehttp/guzzle Version ^7.5
psr/http-message Version ^1.1|^2.0
psr/log Version ^1.1|^2.0|^3.0