Observe execution.
Request hooks plus mysqli, PDO and cURL capture what happens inside PHP. A separate Observer API layer supplies sampled function profiles.
PHPRay is a tool for observing and diagnosing PHP applications. It connects execution time, CPU, memory, SQL, HTTP calls and errors to a specific request.
See what slows down a store or an API. Inspect plugin and component costs on profiled requests. Start on your own server; add Cloud when you need a fleet-wide view.
The extension records events. The collector builds a history. The dashboard lets you investigate it. Each layer has a distinct job.
Request hooks plus mysqli, PDO and cURL capture what happens inside PHP. A separate Observer API layer supplies sampled function profiles.
A single Go binary reads shared memory or JSONL files. It writes SQLite, computes aggregates and manages retention.
The local dashboard and REST API expose traces, SQL and components. Inspect one request in context instead of piecing it together from separate logs.
phpray.so captures request, SQL, HTTP, file and error events. Observer API powers a separate, sampled profiling layer.
Reads the stream, stores SQLite data, applies retention and local alerts. Defaults: 30 days of history and a 4 GB database cap.
Persistent local history. Retention windows and size limits are independent; the oldest records are pruned when either limit is reached.
Local collector interface for the dashboard and CLI. It is distinct from the Cloud /v1/aggregates and /v1/traces protocol.
Sites, traces and component views. Loopback by default, with JWT access control. The local core needs no Cloud account.
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 →
Data stays on the server until you configure Cloud. The local dashboard listens on loopback by default and uses JWT.
Collector configurationA request summary, a detailed trace and a function profile are different levels of data. Their coverage is not interchangeable.
Always-on observes request events. Function profiling goes deeper and is sampled by default.
The remaining 97% collect no function samples. Detailed traces and Cloud export have separate rules and quotas.
Test conditionsPreliminary measurements used WooCommerce, Storefront, 22 plugins, PHP 8.3 and OPcache. Alternating runs with and without the extension, on a laptop. Always-on fell within measurement noise. Profiling every request cost measurably more, but far below a classic execute_ex hook.
Interpretation limitsThis is not a certified benchmark or an overhead guarantee for your server. Full methodology and raw data from a dedicated host are planned before 1.0. Profiling a single URL or time window limits the diagnostic scope.
Source and measurement limitations →Always-on covers requests included in observation. Excluded URIs and CLI tracing, disabled by default, remain outside that scope.
Mode and duration thresholds determine recording detail. Errors have their own rule. Cloud export has separate selection rules and plan quotas.
A 3% sample by default. For a focused investigation, you can profile a specific URL. More detail adds measurement overhead.
Follow this workflow with the WooCommerce demo dataset. The same questions guide an investigation of PHP applications and APIs.
Start with the URL, status and response time. In the example, POST /checkout/ returns a 500 error after 842 ms.
The timeline separates PHP, SQL and HTTP. In the SQL tab, inspect fingerprints, repeated queries and the N+1 pattern. Then check the component context.
After a change, compare the same metric under comparable traffic. Before/after views start at Studio; in the demo you can compare two time windows (p95 per URI, components).
Open the comparison in the demoKeep the same diagnostic context, whether you build a store, develop an API or manage client sites.
Checkout, admin-ajax and product queries. Inspect page requests, SQL fingerprints and N+1 patterns; use profiled requests to investigate plugin and theme costs.
Connect endpoint context with errors, mysqli/PDO query timing and outbound cURL calls. Use the local REST API and CLI in your diagnostic workflow.
From one client to an entire portfolio. One console for stores, applications and environments. Show the client the site, URL and component that needs attention.
Run the local core first, or explore the product with demo data. Local operation does not require a Cloud account or subscription.
Download the installer and review its contents before running it. The documentation covers requirements, installation and verification of the first records.
phpray-install.shcurl -fsSL https://phpray.dev/install.sh -o phpray-install.sh
02 → 03Open the downloaded file. Press Q to exit the viewer.
less phpray-install.sh
After reviewing it, run the installer on your server.
sudo bash phpray-install.sh
Multiple sites, longer history and a shared fleet view. You explicitly enable the connection; the collector sends data over outbound HTTPS. Coverage and retention depend on the plan.