Skip to content

View logs and monitoring

View as Markdown

A function’s Logs and Monitoring tabs show what it printed, how its build went, how much memory it uses, and how often it is called. Use them to debug a function and to follow it in production.

You need a function to inspect, as in Create a function.

The Info, Logs, and Monitoring tabs below the Functions list show the function you select. When the page opens, they show the first function in the list. To see another function, click its row.

  1. In Compute > Functions, select the function in the list.
  2. Below the list, open the Logs tab.
  3. Choose a Duration: 5, 15, or 30 minutes, 1 hour, 6 hours, or 1 day. The default is 5 minutes.
  4. To load the latest lines, click the circular-arrow refresh button beside Duration.

The logs include the function’s own output, and a start line that shows the settings the function started with, such as the body limit.

When a function has failed, the Logs tab combines its runtime logs with its build logs. The function’s own page also has a Build Logs tab with the build output. See Troubleshooting Functions for what to check.

When you call a function with Post Request on its own page, Runtime Logs sits beside Output. See Call a function.

The Info tab shows the selected function’s details, including its URL, Version, Memory, Execution Timeout, Invocation Count, and Outbound IP.

  • Ephemeral Storage is 5 GB.
  • Version goes up by one each time you save a change to the function.
  • Invocation Count is the total number of requests the function has processed.

Open the Monitoring tab. Choose a Duration of 1, 5, 15, or 30 minutes. The charts cover that much time, up to now. The default is 1 minute.

  • Memory Usage: each point is the highest memory, in MB, the function used in the day before that point.
  • Invocation Count: each point is the total number of calls up to that moment.

You can read a function’s logs and details and follow its memory and invocation charts. If a log or a chart points to a problem, see Troubleshooting Functions. To fix what you find, edit the function. See Edit a function.