Skip to content

Logs and analytics

Follow a project's requests, its code's output and its builds, see traffic without adding a script to your pages, and get alerts when something breaks.

On this page

Logs

StreamHolds
accessEvery request: method, path, status, duration, bytes, cache and region.
runtimeLines your code writes, with level and version.
buildBuild lines and version events: ready or failed.
Terminal
perafly logs                         # all streams, newest last
perafly logs access --level warn     # 4xx and 5xx requests
perafly logs runtime -f              # follow new lines (Ctrl-C to stop)
perafly logs --since 2h --search checkout
perafly logs build --version v7      # one version's build log from the hosting provider
  • Levels are info, warn and error; a request with a 5xx status is error, a 4xx is warn. --level shows that level and above.
  • --since takes 15m, 2h, 3d or an ISO date; --limit up to 500 lines; --follow-timeout stops following after some seconds.
  • The dashboard's Logs tab and the mobile app follow new lines live.

How long logs are kept depends on your plan. A query that reaches further back is cut at the limit and the answer says so (truncated: true).

IP addresses, browser user agents and query strings are not stored: the path is cut before ?, because a query string can carry tokens or personal data.

Traffic

Traffic is counted from the requests themselves, so there's no script or cookie on your pages. Choose a range of 1h, 24h, 7d or 30d.

MeasureWhat it counts
RequestsEvery request line.
Page viewsSuccessful GET requests for HTML pages.
VisitorsUnique visitors per day; a person isn't followed across days.
BandwidthResponse bytes.
Status and errors2xx, 3xx, 4xx, 5xx counts; the error rate is 5xx divided by requests.
Top paths and referrersThe 10 most requested paths and the 10 sites sending the most page views.
Terminal
perafly metrics --range 7d
perafly top --watch     # the team's projects ranked by traffic, refreshed

Functions, CPU and memory

A live project isn't a server that runs all the time: its code runs when a request arrives. For projects that run code, Perafly shows invocations, error rate, duration percentiles (p50, p95, max), CPU time and the highest and allocated memory. A static project runs no code; Perafly says so instead of showing zeros. A value that couldn't be measured is shown as empty, not as zero.

Alerts

AlertWhen
Version failedA deployment failed.
Error spikeIn the last 15 minutes: at least 50 requests, at least 5% of them 5xx, and at least three times the rate of the previous 24 hours. At most one alert per project every 6 hours; it links to the project's logs filtered to errors.
Approvals, agent, billing, domains, access requestsEach goes to the teammates whose role covers it.

Alerts arrive in the dashboard and as push notifications; error spikes, billing and domain alerts can also come by email. Choose what you receive in your notification settings.