Ployter

Logs, metrics and requests

Where to see application output, CPU and memory usage, the requests arriving through the domain and each service's crash events.

Each service has three tabs to follow what's happening with it: Logs, with the container output; Metrics, with CPU, memory, network, requests and events; and Requests, with each request arriving through the domain, live. The agent on the service's server reads everything, with nothing to install in the application.

Managed databases have their own metrics and logs. See Managed cloud databases.

Logs

The Logs tab shows the running container's output (stdout and stderr), read live from the server. The required permission is View logs.

Logs tab of the api service with the container output
Logs tab of the api service with the container output

In the log toolbar:

  • The first selector picks the source: Application (container output), one of the extra Processes (queues, workers) or one of the Log files inside the container.
  • N lines: how many lines to fetch (from 100 to 5,000).
  • Errors only: in Laravel/Monolog logs, shows only error entries, with the stack trace.
  • Refresh fetches again. Auto refreshes by itself.
  • The search field filters the lines already on screen.
Tip

Prefer writing logs to the container output. Log files inside the container disappear on the next deploy, unless the folder is a volume. In Laravel, use LOG_CHANNEL=stderr. The folders the panel reads log files from are in Settings → Runtime.

Other logs live elsewhere:

From the terminal, ployter logs -f follows the same log. See CLI.

Metrics

The Metrics tab shows container usage, measured by the agent every 10 seconds. Pick the period at the top: 1h, 6h or 24h. The screen refreshes by itself.

Metrics tab with CPU, memory, requests and response time
Metrics tab with CPU, memory, requests and response time

The panels at the top:

  • CPU: relative to 1 vCPU. 200% is two full cores. Shows the peak and the limit, if you set one.
  • Memory: usage and the service's limit (or "no limit set").
  • Requests: requests per minute and the total for the period.
  • 5xx errors: the rate of server error responses, with the 5xx and 4xx counts.
  • Response time: p95 and average.

Below, the CPU, Memory, Requests per minute, Response time and Network (received and sent) charts.

With replicas, the numbers are the sum of the replicas.

Note

Requests are counted at the server's proxy, through the service's domain. A service without a domain has no requests to measure. Request data needs agent v0.7.0 or newer.

Events

The Events panel records:

  • application crashes (stopped by itself or ran out of memory), with the last log lines (View log);
  • when it came back;
  • autoscaling actions (replica added or removed).

When the application crashes, the top of the service screen shows The application crashed. The server tries to start it again, and the status recovers by itself once it's up. In that notice, Diagnose with AI analyzes the crash. See AI diagnosis.

Requests

The Requests tab shows each request that goes through the service's domain, live, read from the server's proxy. The required permission is View logs.

Requests tab with the live list and the 5xx filter
Requests tab with the live list and the 5xx filter

  • Filter by All, 2xx, 3xx, 4xx or 5xx.
  • Search by path, IP, method.
  • Pause freezes the list (new ones are counted) and Resume continues. Clear empties the screen.
  • Click a row to see the Address (IP), the Browser, the Referrer and the Server that handled it.

The list shows the 1,000 most recent. Internal project traffic (from one service to another, over the internal network) doesn't go through the proxy and doesn't appear here.

If the tab warns that the service has no domain, add one in the Network tab. See Domains and HTTPS.

Get alerts

To find out about a crash or a failed deploy without watching the screen, turn on email alerts. See Notifications and alerts.