Skip to Content

Read logs and metrics

Follow an app's logs live, search its history and watch its CPU, memory and requests.

Goal: find out what an app is doing, and why it fails, from the console.

Before you start

  • A deployed app or static site.

Read the logs

Open the app on the project canvas and go to its Logs tab.

New lines stream in while the tab shows Live. Select it to switch to Paused and read without the view moving.

Narrow the lines down:

  • Search logs for a word or request ID.
  • Level: only Errors, or Warnings and up.
  • Time range: from the last 15 minutes up to 30 days, or Custom.
  • The deploy filter, All deploys by default, to see one rollout.
  • Log source: All, only Requests, or only Server output.

Turn on Wrap lines for long lines. Copy logs copies what you see.

Watch the metrics

  • The Overview tab shows Metrics: CPU and memory of the app.
  • The Usage tab shows HTTP requests, for windows from 15 minutes to 30 days.

Verify

Open the app's URL, then check that the request shows up on the Logs tab (if the app logs requests) and in HTTP requests on the Usage tab.

Troubleshooting

  • No logs at all: the app writes to a file instead of standard output. Log to stdout and stderr.
  • Logs stop at some point this month: the monthly log cap is reached. See Log costs.
  • Memory climbs until the app restarts: the app runs out of memory and is stopped. Give it more memory, or look for a leak.

Log costs

Logs are billed by the GiB ingested above a monthly allowance. Under Billing > Usage:

  • Log ingestion this month shows Within allowance, Near allowance, Billed or Capped.
  • Monthly cap (GiB) stops billing at a size you pick. Once the cap is reached, new lines are dropped until next month. Leave it empty for no cap.
  • Log retention is 30 days by default, included in the price. 60, 90, 180 or 365 days are billed per GiB-month.
  • Size window keeps only the newest GiB you choose.

Next steps

On this page