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.
Before you begin
Section titled “Before you begin”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.
View the logs
Section titled “View the logs”- In Compute > Functions, select the function in the list.
- Below the list, open the Logs tab.
- Choose a Duration: 5, 15, or 30 minutes, 1 hour, 6 hours, or 1 day. The default is 5 minutes.
- 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.
Read the function’s details
Section titled “Read the function’s details”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.
View the monitoring charts
Section titled “View the monitoring charts”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.
What you have now
Section titled “What you have now”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.