inspector.restDocs

Choose an SDK

The inspector.rest SDKs for Node.js and PHP record outgoing HTTP calls with the same configuration names and record format. Compare runtimes and adapters.

An SDK lives in your service, records the HTTP calls it makes and sends them to your environment. Both SDKs use the same configuration names, merge labels in the same order and send the same wire format.

Node.jsPHP
Package@inspector-rest/sdk on npminspector-rest/sdk on Packagist
RuntimeNode.js 22 or newer; also Cloudflare Workers and other runtimes without Node built-insPHP 8.1 or newer
HTTP clientsaxios, @sqaft-reverse/client, any client through lifecycle eventsGuzzle (middleware), any client through hooks
SendingWorker thread, zstd (gzip fallback), keep-aliveAfter the response with PHP-FPM (fastcgi_finish_request()), gzip
Runtime dependenciesNoneGuzzle

What both SDKs guarantee

  • They stay out of the way. On the request path the SDK only stores references. Serialization, compression and sending happen away from the request. Errors inside the SDK are swallowed and never reach your requests.
  • One record per request, with all attempts, sent when the request is done.
  • Bounded memory. Everything the SDK holds is limited; the oldest records are dropped first, and the number of dropped records is reported.
  • Quiet failure. A missing or invalid ingest key makes the SDK warn once and do nothing.
  • No double reads. Bodies are not serialized twice; with body capture off, PHP does not even read the stream.

See Behavior under load and quota for what happens when ingest is slow, down or the plan limit is reached.