EN
PHPRAY / EXPLORE

Start with the evidence.

Explore the product. Inspect the data. Choose your scope.

APACHE-2.0Local core, no accountCloud optional
Go to installation
PHPRay / Technical documentation

Understand the flow.
Take control.

From the first request to fleet configuration. Complete documentation, precise parameters and explicit boundaries.

0.14 / REFERENCE15 chapters · PL / EN
PHPRay DocsPHPRay
overview

PHPRay

YOUR SERVER / LOCAL BOUNDARY
PHP processRINIT / RSHUTDOWN · mysqli / PDO · cURL

phpray.so captures request, SQL, HTTP, file and error events. Observer API powers a separate, sampled profiling layer.

request record
RING BUFFER · /dev/shm/phprayand/orJSONL · /var/lib/phpray/traces
phpray-collectorGo binary · systemd

Reads the stream, stores SQLite data, applies retention and local alerts. Defaults: 30 days of history and a 4 GB database cap.

SQLiteTraces · SQL · 1-minute aggregates

Persistent local history. Retention windows and size limits are independent; the oldest records are pruned when either limit is reached.

REST API/api/v1/*

Local collector interface for the dashboard and CLI. It is distinct from the Cloud /v1/aggregates and /v1/traces protocol.

Local dashboard127.0.0.1:9191 · JWT

Sites, traces and component views. Loopback by default, with JWT access control. The local core needs no Cloud account.

PHPRay CloudOPTIONAL

Disconnected by default. Data stays local until you configure the connection.

Architecture diagram — the switch does not change server configuration.

Expand any node to inspect its scope. Full data protocol →

PHPRay is always-on request tracing for PHP: every request gets a lightweight record of its timing, SQL queries, outbound HTTP calls, PHP errors and N+1 query patterns, at an overhead low enough to leave on in production (see Overhead for what has been measured so far).

On top of the always-on summary, PHPRay runs sampled per-plugin and per-component breakdowns, so you can see which plugin, theme or function eats the request time without profiling every request.

PHPRay works inside PHP itself — there is no root-level agent, sidecar or JVM. It is a PHP extension plus a small on-box collector and a local dashboard, and it runs on shared hosting (CageFS / lsphp), dedicated VPS boxes and containers alike.

The core is free: extension, collector and local dashboard under an open license. The optional PHPRay Cloud fleet console adds cross-server dashboards, plans and alerts, starting at 19 USD per month.

Overhead

The always-on layer hooks request-level events only (request start/end, SQL, outbound HTTP, file I/O, PHP errors) and never sees individual function calls. Per-function profiling uses PHP's observer API and runs only for sampled requests (default 3 %); the other 97 % take no function-level samples at all.

Our internal benchmark (WooCommerce store, 22 plugins, PHP 8.3, OPcache) puts the always-on layer within the measurement noise of the bare-PHP baseline, and profiling of every request measurably above it, yet far below what a classic execute_ex hook costs. Those runs were made on a laptop, so we do not quote them as product figures: certified numbers, the methodology and the raw data will be published once the suite has run on a dedicated, quiet host. Until then treat any precise overhead figure you see quoted for PHPRay as unverified.

Source: docs-site/docs/index.md · PHPRay 0.14
The Polish version is a translation of the English original; parameters and code examples keep their original syntax.
NEXT STEP

Evidence first. Decision next.

Validate local diagnostics, compare tool coverage, then choose Cloud.

Compare products